Re: Exit walsender before confirming remote flush in logical replication

From: Alexander Korotkov <aekorotkov(at)gmail(dot)com>
To: Andrey Silitskiy <a(dot)silitskiy(at)postgrespro(dot)ru>
Cc: Japin Li <japinli(at)hotmail(dot)com>, Ronan Dunklau <ronan(at)dunklau(dot)fr>, Vitaly Davydov <v(dot)davydov(at)postgrespro(dot)ru>, "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>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Subject: Re: Exit walsender before confirming remote flush in logical replication
Date: 2026-03-11 14:24:05
Message-ID: CAPpHfdupdorG3m_TGSWO5ykXXkMAB1UXA7cB9ktr_sW6yt2vbg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi!

On Wed, Mar 4, 2026 at 10:47 AM Andrey Silitskiy
<a(dot)silitskiy(at)postgrespro(dot)ru> wrote:
> On Wed, 03 Mar 2026 Japin Li <japinli(at)hotmail(dot)com> wrote:
> > At first glance, wal_sender_shutdown_timeout seems to have the wrong
> > type.
>
> Fixed.

I've revised this patch fixing grammar in commit message, comments and
documentation.

I think the current patch addresses all the main concerns raised in
the thread. The patch doesn't unconditionally change the behavior: it
introduces a new GUC, which could be set on per-connection basis, and
also affects physical WAL senders. The GUC specifies timeout, which
gives user a flexibility. The default value of the GUC is -1
(disabled). So, no behavior change by default. Also, it doesn't
require replication protocol change. New WalSndDoneImmediate() sends
done message to the receiver just like WalSndDone(). So, existing
clients should be OK.

I'm going to push this if no objections.

------
Regards,
Alexander Korotkov
Supabase

Attachment Content-Type Size
v3-0001-Introduce-a-new-wal_sender_shutdown_timeout-GUC.patch application/x-patch 17.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Evgeny Kuzin 2026-03-11 14:29:39 Re: [PATCH] libpq: try all addresses for a host before moving to next on target_session_attrs mismatch
Previous Message Matthias van de Meent 2026-03-11 14:11:36 Instability in test/regress/sql/portals.sql