| From: | Andrey Silitskiy <a(dot)silitskiy(at)postgrespro(dot)ru> |
|---|---|
| To: | Alexander Korotkov <aekorotkov(at)gmail(dot)com>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
| Cc: | Greg Sabino Mullane <htamfids(at)gmail(dot)com>, 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> |
| Subject: | Re: Exit walsender before confirming remote flush in logical replication |
| Date: | 2026-03-30 03:14:15 |
| Message-ID: | fa4f3713-3e9e-4e6d-8be1-4ca5e2fe8bff@postgrespro.ru |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Mar 29, 2026 Alexander Korotkov <aekorotkov(at)gmail(dot)com> wrote:
> One possible idea why hand may happen for is is that
> WalSndWaitForWal() has missing WalSndCheckShutdownTimeout() call.
On Mar 25, 2026 Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
> I tested wal_sender_shutdown_timeout under several configurations and
> encountered a case where the primary shutdown got stuck, ...
Thanks for your help in finding the issue!
I reproduced the problem, in this configuration it turned out that the
walsender was not terminated by wal_sender_shutdown_timeout in
WalSndWaitForWal(), but only when the physical slot was checked for
inactive flag,
which caused shutdown to hang.
Fix added to the latest patch. Added a perl test-case for this
configuration.
It is worth noting that in this configuration, the second walsender may
terminate due to inactive slot before the wal_sender_shutdown_timeout
terminates the process, so the test checks timeout termination of only
one walsender.
Regards,
Andrey Silitskiy
| Attachment | Content-Type | Size |
|---|---|---|
| v6-0001-Introduce-a-new-wal_sender_shutdown_timeout-GUC.patch | text/x-patch | 24.1 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Ashutosh Bapat | 2026-03-30 03:15:36 | Re: pg_restore documentation and --create/--single-transaction limitation |
| Previous Message | Chao Li | 2026-03-30 03:06:18 | Re: docs: clarify ALTER TABLE behavior on partitioned tables |