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>, Alexander Korotkov <aekorotkov(at)gmail(dot)com>
Subject: Re: Exit walsender before confirming remote flush in logical replication
Date: 2026-01-17 16:20:46
Message-ID: 3d024a19-1256-4177-942a-d7173dacba74@postgrespro.ru
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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, soas notto raiseerrorsonthe subscriberduringa cleanshutdown.
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.

Regards,
Andrey Silitskiy

In response to

Browse pgsql-hackers by date

  From Date Subject
Previous Message Eric Ridge 2026-01-17 16:18:28 Re: Fwd: pg18 bug? SELECT query doesn't work