diff options
author | Peter Geoghegan <pg@bowt.ie> | 2023-04-03 11:47:48 -0700 |
---|---|---|
committer | Peter Geoghegan <pg@bowt.ie> | 2023-04-03 11:47:48 -0700 |
commit | 05a304a855104a8eb6394e044bfbc8e761a4d635 (patch) | |
tree | af3dc96f5440a0fbe69be721e1234bae7920e77d /src/backend/access/spgist | |
parent | e48c817395e1cdc85dbecc4ff3c18e34983ae3f2 (diff) | |
download | postgresql-05a304a855104a8eb6394e044bfbc8e761a4d635.tar.gz postgresql-05a304a855104a8eb6394e044bfbc8e761a4d635.zip |
Make SP-GiST redirect cleanup more aggressive.
Commit 61b313e4 made VACUUM pass down a heaprel to index AM bulkdelete
and vacuumcleanup routines. Although this was primarily intended as
preparation for logical decoding on standbys, it also made it easy to
correct an old deficiency in how we determine how to cleanup SP-GiST
redirect and placeholder tuples.
Pass the heaprel to GlobalVisTestFor() during cleanup of redirect and
placeholder tuples, rather than pessimistically passing NULL.
Author: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Discussion: https://postgr.es/m/02392033-f030-a3c8-c7d0-5c27eb529fec@gmail.com
Diffstat (limited to 'src/backend/access/spgist')
-rw-r--r-- | src/backend/access/spgist/spgvacuum.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/backend/access/spgist/spgvacuum.c b/src/backend/access/spgist/spgvacuum.c index 2f4a4aad241..8a5b540c809 100644 --- a/src/backend/access/spgist/spgvacuum.c +++ b/src/backend/access/spgist/spgvacuum.c @@ -507,8 +507,7 @@ vacuumRedirectAndPlaceholder(Relation index, Relation heaprel, Buffer buffer) xlrec.nToPlaceholder = 0; xlrec.snapshotConflictHorizon = InvalidTransactionId; - /* XXX: providing heap relation would allow more pruning */ - vistest = GlobalVisTestFor(NULL); + vistest = GlobalVisTestFor(heaprel); START_CRIT_SECTION(); |