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.94.2) (envelope-from ) id 1qt0OG-00ARKp-KH for pgsql-hackers@arkaria.postgresql.org; Wed, 18 Oct 2023 06:50:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qt0OE-000XyX-Eo for pgsql-hackers@arkaria.postgresql.org; Wed, 18 Oct 2023 06:50:47 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qt0OE-000XyP-5D for pgsql-hackers@lists.postgresql.org; Wed, 18 Oct 2023 06:50:46 +0000 Received: from oss.nttdata.com ([49.212.34.109]) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qt0OA-001Jjk-Ri for pgsql-hackers@lists.postgresql.org; Wed, 18 Oct 2023 06:50:46 +0000 Received: from oss.nttdata.com (localhost [127.0.0.1]) by oss.nttdata.com (Postfix) with ESMTPA id C3BC860716; Wed, 18 Oct 2023 15:50:39 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at oss.nttdata.com MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 18 Oct 2023 15:50:39 +0900 From: torikoshia To: Alexander Kukushkin Cc: Kyotaro Horiguchi , michael@paquier.xyz, pgsql-hackers@postgresql.org, bungina@gmail.com, pgsql-hackers@lists.postgresql.org Subject: Re: pg_rewind WAL segments deletion pitfall In-Reply-To: References: <8b385bb6d5f87e54c1c6333fece0444a@oss.nttdata.com> <20230824.094538.2107929879048686192.horikyota.ntt@gmail.com> User-Agent: Roundcube Webmail/1.4.11 Message-ID: <763cac924055f1669578bea950c667c7@oss.nttdata.com> X-Sender: torikoshia@oss.nttdata.com List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Thanks for the patch. I tested the v6 patch using the test script attached on [1], old primary has succeeded to become new standby. I have very minor questions on the regression tests mainly regarding the consistency with other tests for pg_rewind: > +setup_cluster; > +create_standby; Would it be better to add parentheses? Also should we add "RewindTest::" for these function? > +primary_psql("create table t(a int)"); > +primary_psql("insert into t values(0)"); > +primary_psql("select pg_switch_wal()"); .. Should 'select', 'create', etc be capitalized? > my $false = "$^X -e 'exit(1)'"; I feel it's hard to understand what does this mean. Isn't it better to add comments and describe this is for windows environments? -- Regards, -- Atsushi Torikoshi NTT DATA Group Corporation