|
8 | 8 | * Portions Copyright (c) 1994, Regents of the University of California
|
9 | 9 | *
|
10 | 10 | * IDENTIFICATION
|
11 |
| - * $Header: /cvsroot/pgsql/src/backend/access/gist/gist.c,v 1.93 2002/05/24 18:57:55 tgl Exp $ |
| 11 | + * $Header: /cvsroot/pgsql/src/backend/access/gist/gist.c,v 1.94 2002/05/28 15:22:33 tgl Exp $ |
12 | 12 | *
|
13 | 13 | *-------------------------------------------------------------------------
|
14 | 14 | */
|
@@ -494,6 +494,14 @@ gistlayerinsert(Relation r, BlockNumber blkno,
|
494 | 494 | /* key is modified, so old version must be deleted */
|
495 | 495 | ItemPointerSet(&oldtid,blkno,child);
|
496 | 496 | gistdelete(r,&oldtid);
|
| 497 | + |
| 498 | +/* |
| 499 | + * if child was splitted, new key for child will be inserted |
| 500 | + * in the end list of child, so we must say to any scans |
| 501 | + * that page is changed beginning from 'child' offset |
| 502 | + */ |
| 503 | +if (ret&SPLITED ) |
| 504 | +gistadjscans(r,GISTOP_SPLIT,blkno,child); |
497 | 505 | }
|
498 | 506 |
|
499 | 507 | ret=INSERTED;
|
@@ -1411,10 +1419,6 @@ gistSplit(Relation r,
|
1411 | 1419 | ItemPointerSet(&(newtup[nlen-1]->t_tid),lbknum,1);
|
1412 | 1420 | }
|
1413 | 1421 |
|
1414 |
| - |
1415 |
| -/* adjust active scans */ |
1416 |
| -gistadjscans(r,GISTOP_SPLIT,BufferGetBlockNumber(buffer),FirstOffsetNumber); |
1417 |
| - |
1418 | 1422 | /* !!! pfree */
|
1419 | 1423 | pfree(rvectup);
|
1420 | 1424 | pfree(lvectup);
|
|