Re: Buffer locking is special (hints, checksums, AIO writes)

From: Melanie Plageman <melanieplageman(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Kirill Reshke <reshkekirill(at)gmail(dot)com>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Noah Misch <noah(at)leadboat(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Subject: Re: Buffer locking is special (hints, checksums, AIO writes)
Date: 2026-01-13 15:05:02
Message-ID: CAAKRu_Zw+o7BwYPMv5mcQk0OH4sro01GgS4YJrHcHMi=u2ep9w@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jan 12, 2026 at 7:33 PM Andres Freund <andres(at)anarazel(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2026-01-13 15:09:14 Re: pg_plan_advice
Previous Message Melanie Plageman 2026-01-13 14:59:12 Re: Buffer locking is special (hints, checksums, AIO writes)