Re: Cleaning up nbtree after logical decoding on standby work
Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
From: "Drouvot, Bertrand" <bertranddrouvot.pg@gmail.com>
To: Peter Geoghegan <pg@bowt.ie>, Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>,
Andres Freund <andres@anarazel.de>
Date: 2023-05-29T08:19:00Z
Lists: pgsql-hackers
Hi, On 5/26/23 7:28 PM, Peter Geoghegan wrote: > On Fri, May 26, 2023 at 1:56 AM Alvaro Herrera <alvherre@alvh.no-ip.org> wrote: >> I suppose you're not thinking of applying this to current master, but >> instead just leave it for when pg17 opens, right? I mean, clearly it >> seems far too invasive to put it in after beta1. > > I was planning on targeting 16 with this. Although I only posted a > patch recently, I complained about the problems in this area shortly > after the code first went in. It's fairly obvious to me that the > changes made to nbtree went quite a bit further than they needed to. Thanks Peter for the call out and the follow up on this! As you already mentioned in this thread, all the changes I've done in 61b313e47e were purely "mechanical" as the main goal was to move forward the logical decoding on standby thread and.. > Admittedly that's partly because I'm an expert on this particular > code. > it was not obvious to me (as I'm not an expert as you are in this area) that many of those changes were "excessive". > Now, to be fair to Bertrand, it *looks* more complicated than it > really is, in large part due to the obscure case where VACUUM finishes > an interrupted page split (during page deletion), which itself goes on > to cause a page split one level up. Thanks ;-) Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com
Commits
-
nbtree: Allocate new pages in separate function.
- d088ba5a5aa4 16.0 landed
-
Pass down table relation into more index relation functions
- 61b313e47eb9 16.0 cited
-
Note case where nbtree VACUUM finishes splits.
- 35bc0ec7c800 12.0 cited
-
Fix interaction between CREATE INDEX and "snapshot too old".
- bf9a60ee3349 9.6.0 cited