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: Andres Freund <andres@anarazel.de>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2023-04-03T19:20:01Z
Lists: pgsql-hackers
On Mon, Apr 3, 2023 at 12:09 AM Drouvot, Bertrand
<bertranddrouvot.pg@gmail.com> wrote:
> Right. Please find enclosed V2 also taking care of BTPageIsRecyclable()
> and _bt_pendingfsm_finalize().

Pushed that as too separate patches just now. Thanks.

BTW, I'm not overly happy about the extent of the changes to nbtree
from commit 61b313e4. I understand that it was necessary to pass down
a heaprel in a lot of places, which is bound to create a lot of churn.
However, a lot of the churn from the commit seems completely
avoidable. There is no reason why the BT_READ path in _bt_getbuf()
could possibly require a valid heaprel. In fact, most individual
BT_WRITE calls don't need heaprel, either -- only those that pass
P_NEW. The changes affecting places like _bt_mkscankey() and
_bt_metaversion() seem particularly bad.

Anyway, I'll take care of this myself at some point after feature freeze.

-- 
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.