Re: Buffer locking is special (hints, checksums, AIO writes) - Mailing list pgsql-hackers

From Melanie Plageman
Subject Re: Buffer locking is special (hints, checksums, AIO writes)
Date
Msg-id CAAKRu_Zw+o7BwYPMv5mcQk0OH4sro01GgS4YJrHcHMi=u2ep9w@mail.gmail.com
Whole thread Raw
In response to Re: Buffer locking is special (hints, checksums, AIO writes)  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
On Mon, Jan 12, 2026 at 7:33 PM Andres Freund <andres@anarazel.de> wrote:
>
> - added a commit that renames ResOwnerReleaseBufferPin to
>   ResOwnerReleaseBuffer (et al), as it now also releases content locks if held
>
>   I kept this separate as I'm not yet sure about the new name, partially due
>   to there also being a "buffer io" resowner.  I tried "buffer ownership" for
>   the resowner that tracks pins and locks, but that was long and not clearly
>   better.

I didn't look at the patch but I strongly agree that
ResOwnerReleaseBufferPin() should not also release locks, so it should
have a new name. Ironic that ResOwnerReleaseBufferIO() releases pins
and not locks.

What about ResOwnerReleaseBufferClaim() or
ResOwnerReleaseBufferAccess() or ResOwnerReleaseBufferHold()?

- Melanie



pgsql-hackers by date:

Previous
From: Melanie Plageman
Date:
Subject: Re: Buffer locking is special (hints, checksums, AIO writes)
Next
From: Robert Haas
Date:
Subject: Re: pg_plan_advice