Re: GetBufferDescriptor() being called for local buffers from MarkBufferDirtyHint() - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: GetBufferDescriptor() being called for local buffers from MarkBufferDirtyHint()
Date
Msg-id akXtPv5Waob47Os2@paquier.xyz
Whole thread
In response to Re: GetBufferDescriptor() being called for local buffers from MarkBufferDirtyHint()  (Ayush Tiwari <ayushtiwari.slg01@gmail.com>)
Responses Re: GetBufferDescriptor() being called for local buffers from MarkBufferDirtyHint()
List pgsql-hackers
On Wed, Jul 01, 2026 at 08:00:38PM +0530, Ayush Tiwari wrote:
> v2 attached sets NLocBuffer = nbufs before the initialization loop, so the
> loop can keep using GetLocalBufferDescriptor(), and drops the now-redundant
> assignment at the end.

Catching up with the latest activity of this thread now that v20 has
opened up.  That's kind of nice.

I have been also reminded about BufferIsValid(), where we already have
similar assertions.  As a whole, that seems acceptable to me, and
using unsigned still does not make much sense here.

Any thoughts or objections regarding a HEAD-only change?
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Xuneng Zhou
Date:
Subject: Re: Fix race in ReplicationSlotRelease for ephemeral slots
Next
From: Tender Wang
Date:
Subject: Re: satisfies_hash_partition crash