Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wyfYR-003Y21-0u for pgsql-hackers@arkaria.postgresql.org; Tue, 25 Aug 2026 01:02:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wyfYO-004ust-0m for pgsql-hackers@arkaria.postgresql.org; Tue, 25 Aug 2026 01:02:16 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wyfYN-004usk-2w for pgsql-hackers@lists.postgresql.org; Tue, 25 Aug 2026 01:02:15 +0000 Received: from mail-m16.yeah.net ([1.95.21.16]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wyfYG-00000002GVD-065C for pgsql-hackers@lists.postgresql.org; Tue, 25 Aug 2026 01:02:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yeah.net; s=s110527; h=Message-ID:Date:MIME-Version:Subject:To:From: Content-Type; bh=sD5zjE3x/XeYEA+vasB93siBCkr3x8B3Xxh8RpOpWm0=; b=M9ZSKmXkCXT3KMy1jrj3jxyvz+BCMjkkB2Dsq3DD/lbLaoDKBGpbFhDSIr0DuH 83Sqs27lAaL3NijmxE6oA30RaWHUaDywq1JF5ZyxDPiDBi//qLt0X9RRPcek9zCB SPRJCjDWt5KQw5xlJq5HMBCHdAsEpkZ0kqR30iqLX50I0= Received: from [192.168.18.5] (unknown []) by gzsmtp1 (Coremail) with UTF8SMTPA id Mc8vCgDX34WH6YxqRTllAQ--.40928S2; Tue, 25 Aug 2026 09:01:59 +0800 (CST) Message-ID: Date: Tue, 25 Aug 2026 09:01:58 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Walreceiver create temp slot more than once when timeline switch To: cca5507 , pgsql-hackers References: Content-Language: en-US From: Quan Zongliang In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-CM-TRANSID: Mc8vCgDX34WH6YxqRTllAQ--.40928S2 X-Coremail-Antispam: 1Uf129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7v73 VFW2AGmfu7bjvjm3AaLaJ3UbIYCTnIWIevJa73UjIFyTuYvj4RJUUUUUUUU X-Originating-IP: [117.10.92.47] X-CM-SenderInfo: htxd06xrqjzxxdqjq5hhdkh0dhw/1tbiIQdZfWqM6YeVHgAA3B List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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_####" >