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

From: Xuneng Zhou <xunengzhou(at)gmail(dot)com>
To: shihao zhong <zhong950419(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 05:16:34
Message-ID: CABPTF7XD94PQcA4Ja+p1OrfPvT01e14_k0DWEY4OE5pV-EK=sg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Nov 11, 2026 at 11:25 AM shihao zhong <zhong950419(at)gmail(dot)com> wrote:
>
> 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.

Make sense. I'll look into this one.

> > 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.

Honestly, I don't have a concrete idea of how to do this for now. Just
a natural thought of keeping the stall causers away instead of asking
them to leave repeatedly.
--
Regards,
Xuneng Zhou
HighGo Software Co., Ltd.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Chao Li 2026-11-11 05:19:23 Re: [PATCH] doc: Fix description of relative extension "directory" setting
Previous Message Sho Ito 2026-11-11 05:09:50 Re: [PATCH] psql: Fix REPACK index completion after a column list