1
0
mirror of https://github.com/postgres/postgres.git synced 2025-10-19 15:49:24 +03:00

Fix missing rows in query

update a=.. where a... with GiST index on column 'a'
Backpatch from 8.0 branch
This commit is contained in:
Teodor Sigaev
2005-08-30 08:36:52 +00:00
parent 2ba0540024
commit d4235f9f18
3 changed files with 43 additions and 20 deletions

View File

@@ -8,7 +8,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/gist/gist.c,v 1.105 2003/08/04 02:39:56 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/access/gist/gist.c,v 1.105.4.1 2005/08/30 08:36:52 teodor Exp $
*
*-------------------------------------------------------------------------
*/
@@ -502,7 +502,7 @@ gistlayerinsert(Relation r, BlockNumber blkno,
* changed beginning from 'child' offset
*/
if (ret & SPLITED)
gistadjscans(r, GISTOP_SPLIT, blkno, child);
gistadjscans(r, GISTOP_SPLIT, nblkno, FirstOffsetNumber);
}
ret = INSERTED;
@@ -1435,6 +1435,9 @@ gistnewroot(Relation r, IndexTuple *itup, int len)
Page p;
b = ReadBuffer(r, GISTP_ROOT);
gistadjscans(r, GISTOP_SPLIT, GISTP_ROOT, FirstOffsetNumber);
GISTInitBuffer(b, 0);
p = BufferGetPage(b);