Re: Pass heaprel to GlobalVisTestFor() in vacuumRedirectAndPlaceholder()

Peter Geoghegan <pg@bowt.ie>

From: Peter Geoghegan <pg@bowt.ie>
To: "Drouvot, Bertrand" <bertranddrouvot.pg@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2023-04-02T17:18:10Z
Lists: pgsql-hackers
On Sun, Apr 2, 2023 at 1:25 AM Drouvot, Bertrand
<bertranddrouvot.pg@gmail.com> wrote:
> 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).

What about BTPageIsRecyclable() and _bt_pendingfsm_finalize()?

Making nbtree page deletion more efficient when logical decoding is in
use seems well worthwhile. There is an "XXX" comment about this issue,
similar to the SP-GiST one. It looks like you already have everything
you need to make this work from yesterday's commit 61b313e47e.

--
Peter Geoghegan



Commits

  1. Make SP-GiST redirect cleanup more aggressive.

  2. Recycle deleted nbtree pages more aggressively.

  3. Move heaprel struct field next to index rel field.

  4. Pass down table relation into more index relation functions

  5. Use full 64-bit XIDs in deleted nbtree pages.