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 f19a6c97-d279-49f9-aab4-fe0d4ccd97f2@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 Fri, 13 Mar 2026 Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
 > With the patch, when I set wal_sender_shutdown_timeout to 1ms and
 > wal_sender_timeout to 1min, it still took about 26s for walsender to shut
 > down due to wal_sender_shutdown_timeout expiration.

Thanks!.

I also reproduced this delay in case of full output buffers. It has already
been fixed in the latest patch.
I think in your case, the 26-second wait was due to walsender falling asleep
at wal_sender_timeout / 2 seconds after receiving the shutdown request.
The issue should have been fixed in the patch (see WalSndComputeSleeptime).

Regards,
Andrey Silitskiy



pgsql-hackers by date:

Previous
From: Andrey Silitskiy
Date:
Subject: Re: Exit walsender before confirming remote flush in logical replication
Next
From: Etsuro Fujita
Date:
Subject: Re: Import Statistics in postgres_fdw before resorting to sampling.