Re: Refactor UnpinBuffer() - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Refactor UnpinBuffer()
Date
Msg-id YzaTuHB4cw3dNGpZ@paquier.xyz
Whole thread Raw
In response to Re: Refactor UnpinBuffer()  (Nathan Bossart <nathandbossart@gmail.com>)
List pgsql-hackers
On Thu, Sep 29, 2022 at 10:35:20AM -0700, Nathan Bossart wrote:
> I've marked this one as ready-for-committer.

UnpinBuffer() is local to bufmgr.c, so it would not be an issue for
external code, and that's 10 callers that don't need to worry about
that anymore.  2d115e4 is from 2015, and nobody has used this option
since, additionally.

Anyway, per the rule of consistency with the surroundings (see
ReleaseBuffer() and ReleaseAndReadBuffer()), it seems to me that there
is a good case for keeping the adjustment of CurrentResourceOwner
before any refcount checks.  I have also kept a mention to
CurrentResourceOwner in the top comment of the function, and applied
that.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Benjamin Coutu
Date:
Subject: Re: disfavoring unparameterized nested loops
Next
From: Benjamin Coutu
Date:
Subject: Re: disfavoring unparameterized nested loops