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

From: Andres Freund <andres(at)anarazel(dot)de>
To: Srinath Reddy Sadipiralla <srinath(dot)reddy(at)zohocorp(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, pgsql <pgsql(at)j-davis(dot)com>
Subject: Re: Why we need to check for local buffers in BufferIsExclusiveLocked and BufferIsDirty?
Date: 2024-12-05 15:41:42
Message-ID: vczvsdofiuvaahgkjiavqqa6ks7nynpxf6iangsk4lzgj2taer@yvuoi3pgxb6t
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2024-12-05 18:38:16 +0530, Srinath Reddy Sadipiralla wrote:
> Why we need to check for local buffers in BufferIsExclusiveLocked and
> BufferIsDirty?,these 2 functions are called only from
> XlogRegisterBuffer,AFAIK which will be called only for permanent
> relations.Please correct me if i am wrong.

That's maybe true for in-core code today, but what guarantees that that's true
for the future? And what about code in extensions?

The gain by not dealing with local buffers in these functions is fairly small
too, so there's not really any reason for a change like yours.

- Andres

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Melanie Plageman 2024-12-05 16:07:52 Vacuum scans all-frozen pages with checksums enabled
Previous Message Tom Kincaid 2024-12-05 15:39:38 Re: code contributions for 2024, WIP version