From: | Srinath Reddy Sadipiralla <srinath(dot)reddy(at)zohocorp(dot)com> |
---|---|
To: | "Andres Freund" <andres(at)anarazel(dot)de>, "pgsql-hackers" <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Why we need to check for local buffers in BufferIsExclusiveLocked and BufferIsDirty? |
Date: | 2024-12-06 04:03:30 |
Message-ID: | 1939a231446.149cb94013982.1963369048635730173@zohocorp.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> ---- On Thu, 05 Dec 2024 21:11:42 +0530 Andres Freund <mailto:andres(at)anarazel(dot)de> wrote ---
> 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
hmm got it,if thats the case, for local buffers lockbuffer will skip acquiring content lock, so assert will fail in BufferIsDirty.
Regards,
Srinath Reddy Sadipiralla
Member of Technical Staff
Zoho
Attachment | Content-Type | Size |
---|---|---|
0001-Dont-Assert-for-local-buffers.patch | application/octet-stream | 953 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | vignesh C | 2024-12-06 05:34:29 | Re: Introduce XID age and inactive timeout based replication slot invalidation |
Previous Message | Nathan Bossart | 2024-12-06 03:58:29 | Re: Remove dependence on integer wrapping |