Re: Exit walsender before confirming remote flush in logical replication

Andrey Silitskiy <a.silitskiy@postgrespro.ru>

From: Andrey Silitskiy <a.silitskiy@postgrespro.ru>
To: Fujii Masao <masao.fujii@gmail.com>
Cc: "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>, Vitaly Davydov <v.davydov@postgrespro.ru>
Date: 2025-11-27T10:19:13Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Add wal_sender_shutdown_timeout GUC to limit shutdown wait for replication

  2. pg_upgrade: Add --copy option

  3. Prevent possibility of panics during shutdown checkpoint.

  4. Support clean switchover.

Attachments

On Nov 23, 2025 at 11:46 PM Fujii Masao
<masao(dot)fujii(at)gmail(dot)com> wrote:
 > The difference is that PGC_USERSET also allows per–replication-user
 > overrides when needed, which gives users more flexibility without
 > losing the ability to set a server-wide setting, I think.
 > ...
 > I think there are valid use cases for applying this setting to
 > physical replication as well.
Thanks for the comments. I agree, this parameter also seems usable
for physical replication, if you use it with caution. In this case,
it really becomes useful to be able to configure a parameter for
each connection. I have added these changes to my patch.

Also, earlier I did not mention another difference between my patch
and those discussed earlier. Previously, even in immediate mode,
WalSndCaughtUp flag was checked before calling WalSndDone,
and this made it impossible to shut down even in immediate mode
with WalSndCaughtUp = false when the server has full output buffers.
This does not happen in the current patch implementation. I added
an additional test case for this situation.

Regards,
Andrey Silitskiy