Re: Cleaning up nbtree after logical decoding on standby work

Andres Freund <andres@anarazel.de>

From: Andres Freund <andres@anarazel.de>
To: Peter Geoghegan <pg@bowt.ie>
Cc: Heikki Linnakangas <hlinnaka@iki.fi>, Michael Paquier <michael@paquier.xyz>, Alvaro Herrera <alvherre@alvh.no-ip.org>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, "Drouvot, Bertrand" <bertranddrouvot.pg@gmail.com>
Date: 2023-06-08T00:12:44Z
Lists: pgsql-hackers
Hi,

On 2023-06-05 12:04:29 -0700, Peter Geoghegan wrote:
> On Sun, May 28, 2023 at 7:49 PM Heikki Linnakangas <hlinnaka@iki.fi> wrote:
> > IMO this makes sense for v16. These new arguments were introduced in
> > v16, so if we have second thoughts, now is the right time to change
> > them, before v16 is released. It will reduce the backpatching effort in
> > the future; if we apply this in v17, then v16 will be the odd one out.
>
> My current plan is to commit this later in the week, unless there are
> further objections. Wednesday or possibly Thursday.

-1. For me separating the P_NEW path makes a lot of sense, but isn't 16
material.  I don't agree that it's a problem to have heaprel as a parameter in
a bunch of places that don't strictly need it today.

I don't really understand why the patch does s/heaprel/heapRel/. Most of these
functions aren't actually using camelcase parameters? This part of the change
just blows up the size, making it harder to review.


 12 files changed, 317 insertions(+), 297 deletions(-)
...

Greetings,

Andres Freund



Commits

  1. nbtree: Allocate new pages in separate function.

  2. Pass down table relation into more index relation functions

  3. Note case where nbtree VACUUM finishes splits.

  4. Fix interaction between CREATE INDEX and "snapshot too old".