Re: Avoiding superfluous buffer locking during nbtree backwards scans - Mailing list pgsql-hackers

From Matthias van de Meent
Subject Re: Avoiding superfluous buffer locking during nbtree backwards scans
Date
Msg-id CAEze2WjxeLJ-PZMszfiJWztx=rVRK6e4UU7gDOjcnYqjLQRXOQ@mail.gmail.com
Whole thread Raw
In response to Avoiding superfluous buffer locking during nbtree backwards scans  (Peter Geoghegan <pg@bowt.ie>)
Responses Re: Avoiding superfluous buffer locking during nbtree backwards scans
List pgsql-hackers
On Fri, 5 Jul 2024 at 18:48, Peter Geoghegan <pg@bowt.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/)



pgsql-hackers by date:

Previous
From: Melih Mutlu
Date:
Subject: Re: Vectored IO in XLogWrite()
Next
From: Greg Sabino Mullane
Date:
Subject: Enable data checksums by default