Re: Exit walsender before confirming remote flush in logical replication
Alexander Korotkov <aekorotkov@gmail.com>
From: Alexander Korotkov <aekorotkov@gmail.com>
To: Fujii Masao <masao.fujii@gmail.com>
Cc: Andrey Silitskiy <a.silitskiy@postgrespro.ru>,
Greg Sabino Mullane <htamfids@gmail.com>, Japin Li <japinli@hotmail.com>, Ronan Dunklau <ronan@dunklau.fr>, Vitaly Davydov <v.davydov@postgrespro.ru>, "Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>, "Takamichi Osumi (Fujitsu)" <osumi.takamichi@fujitsu.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>, "sawada.mshk@gmail.com" <sawada.mshk@gmail.com>,
"michael@paquier.xyz" <michael@paquier.xyz>, "peter.eisentraut@enterprisedb.com" <peter.eisentraut@enterprisedb.com>, "dilipbalaut@gmail.com" <dilipbalaut@gmail.com>,
"andres@anarazel.de" <andres@anarazel.de>, "amit.kapila16@gmail.com" <amit.kapila16@gmail.com>,
Kyotaro Horiguchi <horikyota.ntt@gmail.com>, Peter Smith <smithpb2250@gmail.com>
Date: 2026-03-29T12:34:06Z
Lists: pgsql-hackers
Attachments
- WalSndWaitForWal_WalSndCheckShutdownTimeout.patch (application/octet-stream) patch
Hi, Fujii! On Wed, Mar 25, 2026 at 2:39 PM Fujii Masao <masao.fujii@gmail.com> wrote: > In my tests, the shutdown in step #6 got stuck. > > Any thoughts on whether this indicates a problem in the patch or > something off in my setup? I tried your test case, but I didn't stuck for me while using v5 patch from Andrey [1]. One possible idea why hand may happen for is is that WalSndWaitForWal() has missing WalSndCheckShutdownTimeout() call. See the patch attached. Could I ask you, to retry with this patch applied on top of v5 patch by Andrey [1]. And also, if possible, turn your test into a perl tap test inside 038_walsnd_shutdown_timeout.pl. Thank you. Links 1. https://www.postgresql.org/message-id/aed6b990-e7d8-40d1-96a4-64ccbfbda876%40postgrespro.ru ------ Regards, Alexander Korotkov Supabase
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Avoid blocking indefinitely while finishing walsender shutdown
- c0b24b32b0d3 19 (unreleased) landed
-
Add wal_sender_shutdown_timeout GUC to limit shutdown wait for replication
- a8f45dee9176 19 (unreleased) landed
-
pg_upgrade: Add --copy option
- 746915c68669 16.0 cited
-
Prevent possibility of panics during shutdown checkpoint.
- c6c333436491 10.0 cited
-
Support clean switchover.
- 985bd7d49726 9.4.0 cited