From: Drouvot, Bertrand <bertranddrouvot.pg@gmail.com>
To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Pass heaprel to GlobalVisTestFor() in vacuumRedirectAndPlaceholder()
Date: Sun, 2 Apr 2023 10:23:47 +0200
Message-ID: <02392033-f030-a3c8-c7d0-5c27eb529fec@gmail.com> (raw)
hi hackers,
now that the heap relation is passed down to vacuumRedirectAndPlaceholder()
thanks to 61b313e47e, we can also pass it down to GlobalVisTestFor() too (to
allow more pruning).
Please find attached a tiny patch to do so.
Regards,
--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.comAttachments:v1-0001-make-use-of-heaprel-in-vacuumRedirectAndPlaceholder.patch (text/plain, 564B) downloaddiff --git a/src/backend/access/spgist/spgvacuum.c b/src/backend/access/spgist/spgvacuum.cindex 3cff71e720..5a7e55441b 100644--- a/src/backend/access/spgist/spgvacuum.c+++ b/src/backend/access/spgist/spgvacuum.c@@ -506,8 +506,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();
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: bertranddrouvot.pg@gmail.com
Subject: Re: Pass heaprel to GlobalVisTestFor() in vacuumRedirectAndPlaceholder()
In-Reply-To: <02392033-f030-a3c8-c7d0-5c27eb529fec@gmail.com>
References: <02392033-f030-a3c8-c7d0-5c27eb529fec@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox