Re: Avoiding superfluous buffer locking during nbtree backwards scans

From: Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>
To: Peter Geoghegan <pg(at)bowt(dot)ie>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Avoiding superfluous buffer locking during nbtree backwards scans
Date: 2024-08-06 22:31:31
Message-ID: CAEze2WjxeLJ-PZMszfiJWztx=rVRK6e4UU7gDOjcnYqjLQRXOQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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/)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Sabino Mullane 2024-08-06 22:46:52 Enable data checksums by default
Previous Message Melih Mutlu 2024-08-06 22:30:17 Re: Vectored IO in XLogWrite()