On Fri, 5 Jul 2024 at 18:48, Peter Geoghegan <pg(at)bowt(dot)ie> wrote:
>
> Attached patch teaches nbtree backwards scans to avoid needlessly
> relocking a previously read page/buffer at the point where we need to
> consider reading the next page (the page to the left).
+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.
Kind regards,
Matthias van de Meent
Neon (https://neon.tech/)