diff options
Diffstat (limited to 'src/backend/access/spgist/spgscan.c')
-rw-r--r-- | src/backend/access/spgist/spgscan.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/backend/access/spgist/spgscan.c b/src/backend/access/spgist/spgscan.c index 8aa28ecbc39..fafdca31f39 100644 --- a/src/backend/access/spgist/spgscan.c +++ b/src/backend/access/spgist/spgscan.c @@ -301,7 +301,7 @@ spgLeafTest(Relation index, SpGistScanOpaque so, */ static void spgWalk(Relation index, SpGistScanOpaque so, bool scanWholeIndex, - storeRes_func storeRes) + storeRes_func storeRes, Snapshot snapshot) { Buffer buffer = InvalidBuffer; bool reportedSome = false; @@ -341,7 +341,7 @@ redirect: } /* else new pointer points to the same page, no work needed */ - page = BufferGetPage(buffer); + page = BufferGetPage(buffer, NULL, NULL, BGP_NO_SNAPSHOT_TEST); isnull = SpGistPageStoresNulls(page) ? true : false; @@ -576,7 +576,7 @@ spggetbitmap(IndexScanDesc scan, TIDBitmap *tbm) so->tbm = tbm; so->ntids = 0; - spgWalk(scan->indexRelation, so, true, storeBitmap); + spgWalk(scan->indexRelation, so, true, storeBitmap, scan->xs_snapshot); return so->ntids; } @@ -635,7 +635,8 @@ spggettuple(IndexScanDesc scan, ScanDirection dir) } so->iPtr = so->nPtrs = 0; - spgWalk(scan->indexRelation, so, false, storeGettuple); + spgWalk(scan->indexRelation, so, false, storeGettuple, + scan->xs_snapshot); if (so->nPtrs == 0) break; /* must have completed scan */ |