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 09:01:58 +0800
Message-ID: <fd040b35-7fa4-4d9a-9210-d79ccd75d2e8@yeah.net> (raw)
In-Reply-To: <tencent_628FDAF814231923BC8E8357BBBC50F94207@qq.com>
References: <tencent_628FDAF814231923BC8E8357BBBC50F94207@qq.com>
On 8/22/26 11:12 PM, cca5507 wrote:
> Fix
> ===
>
> Make sure that the walreceiver creates temp slot only once.
>
> Thoughts?
I think there is nothing wrong with the code of this patch.
Furthermore, if a log output is added before walrcv_create_slot(). This
might make the log more clear.
ereport(LOG, errmsg("creating replication slot \"%s\"", slotname));
The log will output:
2026-08-25 08:44:23.199 CST [27043] LOG: creating replication slot
"pg_walreceiver_####"
>
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: <fd040b35-7fa4-4d9a-9210-d79ccd75d2e8@yeah.net>
References: <tencent_628FDAF814231923BC8E8357BBBC50F94207@qq.com> <fd040b35-7fa4-4d9a-9210-d79ccd75d2e8@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