Re: Exit walsender before confirming remote flush in logical replication
Japin Li <japinli@hotmail.com>
From: Japin Li <japinli@hotmail.com>
To: Andrey Silitskiy <a.silitskiy@postgrespro.ru>
Cc: 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>, Greg Sabino Mullane
<htamfids@gmail.com>, Alexander Korotkov <aekorotkov@gmail.com>, Fujii
Masao <masao.fujii@gmail.com>
Date: 2026-03-04T01:59:20Z
Lists: pgsql-hackers
On Tue, 03 Mar 2026 at 14:08, Andrey Silitskiy <a.silitskiy@postgrespro.ru> wrote: > On Feb 10, 2026 Ronan Dunklau <ronan(at)dunklau(dot)fr> wrote: >> - however, if one were to stop the service before doing a pg_upgrade, >> they would have no other choice than either disable the behaviour >> entirely (by switching to wait_flush) or fail the upgrade if a logical >> replication slot is pending changes. > > I agree with you, this idea is more flexible. So I changed the interface > from the one discussed in this thread from the very beginning to a timeout. > Propose an updated patch. > > Best Regards, > Andrey > At first glance, wal_sender_shutdown_timeout seems to have the wrong type. It should be an integer, not an enum. + <term><varname>wal_sender_shutdown_timeout</varname> (<type>enum</type>) > [2. text/x-patch; v1-0001-Introduce-a-new-GUC-wal_sender_shutdown_timeout.patch]... -- Regards, Japin Li ChengDu WenWu Information Technology Co., Ltd.
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