Hi,

On Tue, Sep 1, 2026 at 3:05 PM JoongHyuk Shin <[email protected]> wrote:
>
> I've read v8, though I haven't tested it.
> The recheck in RegisterPinCountWaiter() closes the window I described.
> I also think 0002 is worth keeping.

Sorry for the late reply here.

 * The caller must already be registered as the shared buffer's
+ * BM_PIN_COUNT_WAITER.

This line of comment for PinCountWaiterCheckReadyForCleanup in v8
seems not accurate to me. RegisterPinCountWaiter() explicitly permits
the shared bit BM_PIN_COUNT_WAITER to be absent. The invariante seems
to be:

Assert(PinCountWaitBuf == bufHdr); This process owns the logical
cleanup wait for this buffer.

Updated this, and extended the commit message like we discussed
earlier though it might not get used at the end. The timeout para in
that message is basically a summary of the first email in this thread.
I am not that familiar with it and too tired to proof-read it. Can you
do me a favor?

Beside these, I have no further comments on the patches. They seem to
be in good shape for a bug fix. Just wondering whether we need a test
for it.

--
Regards,
Xuneng Zhou
HighGo Software Co., Ltd.

Attachment: v9-0002-Use-RegisterPinCountWaiter-in-LockBufferForCleanu.patch
Description: Binary data

Attachment: v9-0001-Fix-premature-wakeups-in-hot-standby-buffer-pin-c.patch
Description: Binary data

Reply via email to