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 1wyeY7-003XIW-2A for pgsql-hackers@arkaria.postgresql.org; Mon, 24 Aug 2026 23:57:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wyeY6-004sH2-0f for pgsql-hackers@arkaria.postgresql.org; Mon, 24 Aug 2026 23:57:54 +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 1wyeY5-004sGu-0x for pgsql-hackers@lists.postgresql.org; Mon, 24 Aug 2026 23:57:53 +0000 Received: from mail-m16.yeah.net ([1.95.21.17]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wyeXx-00000002G7S-3hBt for pgsql-hackers@lists.postgresql.org; Mon, 24 Aug 2026 23:57:51 +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=xlHUPWUPM9a8QY0+2ShixY7ANpsz/9P2bNeuffU5ks0=; b=RogFFb+4DlSzUm3761MnrsIw5qC50oj8Bx85eTtDoqpy+1ozeN7qeyVwyDUT1y +fbl/o/TTAuzxWMTiswtGyz4OLljGS8SoON1bYEDdO4zDPMIhiFT0KU7az3QyKoh HaqPpLXNDSLb22o87YCaE+M6Qa60w8zlmvQUjjS3aotKk= Received: from [192.168.18.5] (unknown []) by gzsmtp3 (Coremail) with UTF8SMTPA id M88vCgDn71ly2oxqYzIhBw--.41933S2; Tue, 25 Aug 2026 07:57:39 +0800 (CST) Message-ID: <80e17404-f0a9-4ba7-b722-e2ba2f9e47f5@yeah.net> Date: Tue, 25 Aug 2026 07:57:38 +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: M88vCgDn71ly2oxqYzIhBw--.41933S2 X-Coremail-Antispam: 1Uf129KBjvdXoW7GFyDWw4ruFWxKF1fAFyDtrb_yoWDuFX_Ww n5GFs3CF47WanrKw17tr1qyr4qyF4xA3W0y3yrKr43Cw10qa1FvFnrArZ5AFn5Wa13Ja4j y34DuF4ag3W2gjkaLaAFLSUrUUUUjb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7xR_UUUUUUUUU== X-Originating-IP: [117.10.92.47] X-CM-SenderInfo: htxd06xrqjzxxdqjq5hhdkh0dhw/1tbiNROQtGqM2nNiAwAA3s 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: > > 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? >