Re: Why we need to check for local buffers in BufferIsExclusiveLocked and BufferIsDirty?

From: Srinath Reddy <srinath2133(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Why we need to check for local buffers in BufferIsExclusiveLocked and BufferIsDirty?
Date: 2025-01-26 16:54:50
Message-ID: CAFC+b6pD5KmdCcc+danACNuo7DxPC6yoyaqD3YBnPBSXFzfQNg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Jan 26, 2025 at 9:49 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Srinath Reddy <srinath2133(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrey Borodin 2025-01-26 17:04:15 Re: Using Expanded Objects other than Arrays from plpgsql
Previous Message Álvaro Herrera 2025-01-26 16:38:30 Re: Allow NOT VALID foreign key constraints on partitioned tables.