On Fri, 30 Aug 2024 at 21:43, Matthias van de Meent <boekewurm+postg...@gmail.com> wrote: > > On Mon, 19 Aug 2024 at 13:43, Matthias van de Meent > <boekewurm+postg...@gmail.com> wrote: > > > > On Sun, 11 Aug 2024 at 21:44, Peter Geoghegan <p...@bowt.ie> wrote: > > > > > > On Tue, Aug 6, 2024 at 6:31 PM Matthias van de Meent > > > <boekewurm+postg...@gmail.com> wrote: > > > > +1, LGTM. > > > > > > > > This changes the backward scan code in _bt_readpage to have an > > > > approximately equivalent handling as the forward scan case for > > > > end-of-scan cases, which is an improvement IMO. > > > > Here's a new patch that further improves the situation, so that we > > don't try to re-lock the buffer we just accessed when we're stepping > > backward in index scans, reducing buffer lock operations in the common > > case by 1/2. > > Attached is an updated version of the patch, now v2, which fixes some > assertion failures for parallel plans by passing the correct > parameters to _bt_parallel_release for forward scans.
I noticed I attached an older version of the patch which still had 1 assertion failure case remaining (thanks cfbot), so here's v3 which solves that problem. Kind regards, Matthias van de Meent Neon (https://neon.tech)
v3-0001-Avoid-unneeded-nbtree-backwards-scan-buffer-locks.patch
Description: Binary data