Re: Exit walsender before confirming remote flush in logical replication - Mailing list pgsql-hackers

From Andrey Silitskiy
Subject Re: Exit walsender before confirming remote flush in logical replication
Date
Msg-id 091704a7-dc44-45c2-874a-7eec7fba6071@postgrespro.ru
Whole thread Raw
In response to Re: Exit walsender before confirming remote flush in logical replication  (Fujii Masao <masao.fujii@gmail.com>)
List pgsql-hackers
On Wed, Nov 19, 2025 at 8:46 PM Fujii Masao
<masao(dot)fujii(at)gmail(dot)com> wrote:
 > How about using PGC_USERSET instead of PGC_SIGHUP, similar to
 > wal_sender_timeout?

Dear Fujii, thanks for the review!

Current version of the patch suggests changing the shutdown mode of
logical senders globally for the server. As I wrote above: patch
excludes receiver's side decision whether the sender is allowed to hang
on shutdown. In addition, it provides simpler administration of a system.
But I'm ready to hear other opinions on this matter.

 > Shouldn't physical replication walsenders also honor this parameter?
 > For example, the immediate mode seems useful for physical walsenders
connected
 > from a very remote standby (e.g., DR site). Thought?

As discussed earlier, physical replication is more sensitive to data
divergence and there is no problem with apply_worker and backend lock
conflict, which makes the use-case more narrow.

By the way, does anyone find the name of IMMEDIATE mode too similar to
the "pg_ctl stop" mode and a little confusing? Initially, I planned
to call this mode WALSND_SHUTDOWN_MODE_FORCED instead of
WALSND_SHUTDOWN_MODE_IMMEDIATE.

Best Regards,
Andrey Silitskiy



pgsql-hackers by date:

Previous
From: "Aya Iwata (Fujitsu)"
Date:
Subject: RE: [PROPOSAL] Termination of Background Workers for ALTER/DROP DATABASE
Next
From: Thomas Munro
Date:
Subject: Re: Trying out