From: Quan Zongliang <quanzongliang@yeah.net>
To: cca5507 <cca5507@qq.com>
To: pgsql-hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: Walreceiver create temp slot more than once when timeline switch
Date: Tue, 25 Aug 2026 07:57:38 +0800
Message-ID: <80e17404-f0a9-4ba7-b722-e2ba2f9e47f5@yeah.net> (raw)
In-Reply-To: <tencent_628FDAF814231923BC8E8357BBBC50F94207@qq.com>
References: <tencent_628FDAF814231923BC8E8357BBBC50F94207@qq.com>
On 8/22/26 11:12 PM, cca5507 wrote:
>
> Logs of standby
> ===============
>
> 2026-08-22 22:59:08.663 CST [49194] LOG: started streaming WAL from primary at 0/03000000 on timeline 1
> 2026-08-22 22:59:08.674 CST [49194] LOG: replication terminated by primary server
> 2026-08-22 22:59:08.674 CST [49194] DETAIL: End of WAL reached on timeline 1 at 0/03052948.
> 2026-08-22 22:59:08.677 CST [49193] LOG: new target timeline is 2
> 2026-08-22 22:59:08.677 CST [49193] LOG: invalid record length at 0/03052948: expected at least 24, got 0
> 2026-08-22 22:59:08.678 CST [49194] FATAL: could not create replication slot "pg_walreceiver_49195": ERROR: replication slot "pg_walreceiver_49195" already exists
> 2026-08-22 22:59:08.682 CST [49196] LOG: started streaming WAL from primary at 0/03000000 on timeline 2
>
The bug has been reproduced.
> Fix
> ===
>
> Make sure that the walreceiver creates temp slot only once.
After testing, it was confirmed that it did not occur again. I'm
planning to conduct another long-term test.
>
> Thoughts?
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: quanzongliang@yeah.net, cca5507@qq.com
Subject: Re: Walreceiver create temp slot more than once when timeline switch
In-Reply-To: <80e17404-f0a9-4ba7-b722-e2ba2f9e47f5@yeah.net>
References: <tencent_628FDAF814231923BC8E8357BBBC50F94207@qq.com> <80e17404-f0a9-4ba7-b722-e2ba2f9e47f5@yeah.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox