Re: Why we need to check for local buffers in BufferIsExclusiveLocked and BufferIsDirty? - Mailing list pgsql-hackers

From Srinath Reddy
Subject Re: Why we need to check for local buffers in BufferIsExclusiveLocked and BufferIsDirty?
Date
Msg-id CAFC+b6pD5KmdCcc+danACNuo7DxPC6yoyaqD3YBnPBSXFzfQNg@mail.gmail.com
Whole thread Raw
In response to Re: Why we need to check for local buffers in BufferIsExclusiveLocked and BufferIsDirty?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Why we need to check for local buffers in BufferIsExclusiveLocked and BufferIsDirty?
List pgsql-hackers


On Sun, Jan 26, 2025 at 9:49 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Srinath Reddy <srinath2133@gmail.com> writes:
> as suggested did the changes and attached the patch for the same.

Uh ... what in the world is the point of changing
BufferIsExclusiveLocked's signature?

                        regards, tom lane

as there was repeated code between BufferIsExclusiveLocked and BufferIsDirty to check if buffer is pinned and its locked exclusively,i thought it would be nice to move that repeated code into BufferIsExclusiveLocked and as we need bufHdr in BufferIsDirty which is assigned in BufferIsExclusiveLocked,so I had to change the signature of BufferIsExclusiveLocked by adding (BufferDesc **bufHdr).

Regards,
Srinath Reddy Sadipiralla,
EDB: http://www.enterprisedb.com

pgsql-hackers by date:

Previous
From: Álvaro Herrera
Date:
Subject: Re: Allow NOT VALID foreign key constraints on partitioned tables.
Next
From: Andrey Borodin
Date:
Subject: Re: Using Expanded Objects other than Arrays from plpgsql