Re: Exit walsender before confirming remote flush in logical replication

From: Andrey Silitskiy <a(dot)silitskiy(at)postgrespro(dot)ru>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, "Takamichi Osumi (Fujitsu)" <osumi(dot)takamichi(at)fujitsu(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, "sawada(dot)mshk(at)gmail(dot)com" <sawada(dot)mshk(at)gmail(dot)com>, "michael(at)paquier(dot)xyz" <michael(at)paquier(dot)xyz>, "peter(dot)eisentraut(at)enterprisedb(dot)com" <peter(dot)eisentraut(at)enterprisedb(dot)com>, "dilipbalaut(at)gmail(dot)com" <dilipbalaut(at)gmail(dot)com>, "andres(at)anarazel(dot)de" <andres(at)anarazel(dot)de>, "amit(dot)kapila16(at)gmail(dot)com" <amit(dot)kapila16(at)gmail(dot)com>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, Peter Smith <smithpb2250(at)gmail(dot)com>, Greg Sabino Mullane <htamfids(at)gmail(dot)com>, Vitaly Davydov <v(dot)davydov(at)postgrespro(dot)ru>
Subject: Re: Exit walsender before confirming remote flush in logical replication
Date: 2025-11-27 10:19:13
Message-ID: dcf6a30c-ad28-4644-8523-58f9779156c2@postgrespro.ru
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

Attachment Content-Type Size
v2-0001-Introduce-a-new-GUC-wal_sender_shutdown_mode.patch text/x-patch 13.7 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Nazir Bilal Yavuz 2025-11-27 10:19:26 Re: meson and check-tests
Previous Message shveta malik 2025-11-27 09:50:57 Re: POC: enable logical decoding when wal_level = 'replica' without a server restart