Re: GetBufferDescriptor() being called for local buffers from MarkBufferDirtyHint()

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Ayush Tiwari <ayushtiwari(dot)slg01(at)gmail(dot)com>
Cc: Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: GetBufferDescriptor() being called for local buffers from MarkBufferDirtyHint()
Date: 2026-07-02 04:46:54
Message-ID: akXtPv5Waob47Os2@paquier.xyz
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tender Wang 2026-07-02 04:47:30 Re: satisfies_hash_partition crash
Previous Message Xuneng Zhou 2026-07-02 04:45:01 Re: Fix race in ReplicationSlotRelease for ephemeral slots