Re: Set 1s WaitLatch timeout if standby limit has expired in ResolveRecoveryConflictWithBufferPin

From: shihao zhong <zhong950419(at)gmail(dot)com>
To: Xuneng Zhou <xunengzhou(at)gmail(dot)com>
Cc: Dmytro Astapov <dastapov(at)gmail(dot)com>, Anthony Hsu <erwaman(at)gmail(dot)com>, Álvaro Herrera <alvherre(at)kurilemu(dot)de>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Set 1s WaitLatch timeout if standby limit has expired in ResolveRecoveryConflictWithBufferPin
Date: 2026-11-11 03:25:00
Message-ID: CAGRkXqTFsu-BYSOOFW5k2x+=KOvMpJyx_ta1bLPrZyAXv6h0mQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Xuneng,

Thanks for reviewing this patch.

> The diganose of the problem seems good to me. The fix is small and
> helps to mitigate the stall.

Yes, so I think we can start from the existing patch and get it backpatched.

> A more ideal fix seems to be more
> event-driven -- let the late pinners cancel themselves.

If I understand correctly, you are referring to changing the PINBuffer logic
where the backend sees BM_PIN_COUNT_WAITER and cancels itself?

I am not sure if that is the best approach as PinBuffer is in the hot path.

Thanks,
Shihao

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Raja Sai pranav 2026-11-11 04:00:05 Re: Re: Assertion failure in WAL summarizer
Previous Message Raja Sai pranav 2026-11-11 03:17:17 Re: Re: Assertion failure in WAL summarizer