| 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-26 03:07:28 |
| Message-ID: | CABPTF7Uhhce6H1WNr96fTWcavqkQShrbrhdE+C6xWroizsWVmA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Wed, Nov 11, 2026 at 1:16 PM Xuneng Zhou <xunengzhou(at)gmail(dot)com> wrote:
> 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.
I found the COW idea mentioned by Satya pretty interesting. Fundamentally,
we use cleanup lock to ensure that replay doesn't move bytes while readers
point at them. COW could guarantee this without the problems related to
$subject.
[1] https://postgr.es/m/BANLkTikfXjmOVrV2O40yUJ4BYjX9aUh7=g@mail.gmail.com
[2]
https://postgr.es/m/CAHg+QDf3NcB3vOAqQ5EFcV5DYYUZ9snCSJAU-x1JDbtcjK3eBQ@mail.gmail.com
--
Regards,
Xuneng Zhou
HighGo Software Co., Ltd.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Lukas Fittl | 2026-11-26 03:12:37 | Re: Unify parallel worker handling for index builds and instrumentation |
| Previous Message | Chao Li | 2026-11-26 03:06:57 | Re: Fix assert failure in composite type dependency check for index expr |