| From: | Álvaro Herrera <alvherre(at)kurilemu(dot)de> |
|---|---|
| To: | Anthony Hsu <erwaman(at)gmail(dot)com> |
| Cc: | Xuneng Zhou <xunengzhou(at)gmail(dot)com>, João Rito <joaovictor(dot)rito(at)gmail(dot)com>, shihao zhong <zhong950419(at)gmail(dot)com>, Andrey Borodin <x4mmm(at)yandex-team(dot)ru>, Dmytro Astapov <dastapov(at)gmail(dot)com>, 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-27 10:34:22 |
| Message-ID: | awlbDMfK2sHts9dw@alvherre.pgsql |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On 2026-Nov-26, Anthony Hsu wrote:
> Hi Xuneng,
>
> Thanks for the review and pointing out the possible race. I attached a new
> v5 patch where I removed the $log_location assignment as you suggested.
> Also added "Reviewed-by: Xuneng Zhou <xunengzhou(at)gmail(dot)com>" to the commit
> message.
Thanks, I have pushed this, with some minor comment rewriting. One
funny thing is that BufferCleanup was previously called BufferPin, so
the tests were failing in all branches older than 19. Also the wait
events have been renamed a couple of times.
One thing I'm not really in love with is to have the WaitLatch/
ResetLatch dance directly in ResolveRecoveryConflictWithBufferPin(),
when previously it was neatly encapsulated in ProcWaitForSignal(). I
think (for master only) we should consider adding a timeout parameter to
ProcWaitForSignal(), which would I think make this code a tiny bit neater.
Lastly, I had never heard of this kill_kill thing, and a quick grep will
tell you that 006_logical_decoding.pl learned in 2017 [1] that Windows
doesn't like it, or something. So we may need a SKIP in this new test,
depending on whether IPC::Run has been fixed in the meantime or not.
[1] https://postgr.es/c/734cb4c2e7de92972c01b6339a3e15ac4bc605dd
--
Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jim Jones | 2026-11-27 10:34:51 | Re: OOM kill in xmlelement() with large arrays |
| Previous Message | Daniel Gustafsson | 2026-11-27 10:29:24 | Re: pg_upgrade's get_rel_infos_query() query can sometimes be slow |