Re: Exit walsender before confirming remote flush in logical replication

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Andrey Silitskiy <a(dot)silitskiy(at)postgrespro(dot)ru>
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>, Alexander Korotkov <aekorotkov(at)gmail(dot)com>
Subject: Re: Exit walsender before confirming remote flush in logical replication
Date: 2026-01-19 12:41:32
Message-ID: CAHGQGwHo6XgsS5NCiC9hwa3SqUBTHSLmcqNUVg=BSv76oDOFsw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Jan 18, 2026 at 1:20 AM Andrey Silitskiy
<a(dot)silitskiy(at)postgrespro(dot)ru> wrote:
>
> On Jan 9, 2026 at 10:04 AM Fujii Masao
> <masao(dot)fujii(at)gmail(dot)com> wrote:
> > Why do we need to send a "done" message to the receiver here?
> > Since delivery isn't guaranteed in immediate mode, it seems of limited
> > value.
>
> It seems to me that it is better to send a message in cases where it is
> possible, so as not to raise errors on the subscriber during a clean shutdown.
> And when this is not possible, exit the process without waiting.
>
> > For the immediate mode, would it make sense to log that the walsender is
> > terminating in immediate mode and that WAL replication may be incomplete,
> > so users can more easily understand what happened?
>
> Added to the latest patch.

Thanks for updating the patch!

cfbot is reporting a test failure. Could you please look into it and
fix the issue?
https://cirrus-ci.com/github/postgresql-cfbot/postgresql/cf%2F6234

Regards,

--
Fujii Masao

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Vitaly Davydov 2026-01-19 12:43:16 Deadlock detector fails to activate on a hot standby replica
Previous Message Bertrand Drouvot 2026-01-19 12:17:06 Re: Flush some statistics within running transactions