| From: | Andrey Borodin <x4mmm(at)yandex-team(dot)ru> |
|---|---|
| To: | Álvaro Herrera <alvherre(at)kurilemu(dot)de> |
| Cc: | Anthony Hsu <erwaman(at)gmail(dot)com>, Xuneng Zhou <xunengzhou(at)gmail(dot)com>, João Rito <joaovictor(dot)rito(at)gmail(dot)com>, shihao zhong <zhong950419(at)gmail(dot)com>, Dmytro Astapov <dastapov(at)gmail(dot)com>, pgsql-hackers mailing list <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi> |
| Subject: | Re: Set 1s WaitLatch timeout if standby limit has expired in ResolveRecoveryConflictWithBufferPin |
| Date: | 2026-11-28 05:26:35 |
| Message-ID: | 88BF6D4C-C569-4FEF-9B82-FA70F238EBA4@yandex-team.ru |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
> On 27 Nov 2026, at 17:27, Álvaro Herrera <alvherre(at)kurilemu(dot)de> wrote:
>
> Is this patch sufficient? I suspect not ... If not, I'm
> inclined to wrap the whole test in a SKIP block until a complete fix is
> developed.
>
> (There's also a 50_000 us timeout which is likely insufficient in slow
> machines ...)
I think the main problem is relying on a sleep for synchronization.
On tamandua [0], the COPY backend itself was canceled before the second
cursor opened. What about using an injection point?
The attached patch for master pauses the first reader when it receives
the conflict signal, while it still holds the pin. Only then does the
second reader connect. If it gets a buffer pin conflict, startup must
have sent the signal again.
With the old wait restored, the test fails at that check. With the fix
it passes locally with forced parallelism and beetle's log prefix.
PG15 and PG16 lack injection points. I'd be fine with leaving this
test case disabled there...
Thanks!
Best regards, Andrey Borodin.
[0] https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=tamandua&dt=2026-11-27%2011%3A42%3A56
| Attachment | Content-Type | Size |
|---|---|---|
| 0001-Synchronize-the-standby-buffer-pin-conflict-test.patch | application/octet-stream | 7.8 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bjorn Pagen | 2026-11-28 06:26:32 | [PATCH] pg_plan_advice: NESTED_LOOP_MEMOIZE advice can fail |
| Previous Message | Xnerv Wang | 2026-11-28 02:35:49 | GetNewOidWithIndex() can reuse a TOAST value ID while its chunks are still in the heap |