Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jT1Dy-0002a3-UX for pgsql-bugs@arkaria.postgresql.org; Mon, 27 Apr 2020 10:42:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jT1Dx-0007nK-LR for pgsql-bugs@arkaria.postgresql.org; Mon, 27 Apr 2020 10:42:53 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jT1Dx-0007nD-7O for pgsql-bugs@lists.postgresql.org; Mon, 27 Apr 2020 10:42:53 +0000 Received: from mail.dalibo.com ([212.85.157.172]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jT1Du-0004fF-SG for pgsql-bugs@lists.postgresql.org; Mon, 27 Apr 2020 10:42:52 +0000 Received: from firost (larco.ioguix.net [82.66.0.6]) by mail.dalibo.com (Postfix) with ESMTPSA id 5CFEC21364; Mon, 27 Apr 2020 12:42:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=dalibo.com; s=a; t=1587984168; bh=MiPk7Eq0mBb2oa46AiFGipdo96ZdyhRhuXeolIO09W0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=UQzhkDTTC1Kl9ze6Avpm2remPIwEuXbfIdpFKvWVcFxK+UPoGItQjzpz5SYpvkTqJ cnDsZ83HTQLk23xvSxfceWlHwOY8vMxzPq9l7Y+TSV+OGeHbnZ3AK+muEc6beidYM+ ow9a87wMBxAGXP0wuMoEx70agQz67JU9P9CiuD9k= Date: Mon, 27 Apr 2020 12:42:47 +0200 From: Jehan-Guillaume de Rorthais To: Kyotaro Horiguchi Cc: michael@paquier.xyz, tgl@sss.pgh.pa.us, masao.fujii@oss.nttdata.com, pgsql-bugs@lists.postgresql.org Subject: Re: [BUG] non archived WAL removed during production crash recovery Message-ID: <20200427124247.32baae44@firost> In-Reply-To: <20200427.182107.1145997462405167356.horikyota.ntt@gmail.com> References: <20200424034248.GL33034@paquier.xyz> <20200424150300.1b3b0c20@firost> <20200427074945.GG11369@paquier.xyz> <20200427.182107.1145997462405167356.horikyota.ntt@gmail.com> Organization: Dalibo MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Mon, 27 Apr 2020 18:21:07 +0900 (JST) Kyotaro Horiguchi wrote: > At Mon, 27 Apr 2020 16:49:45 +0900, Michael Paquier > wrote in [...] > > With your patch the problem does not show up anymore even with the > > delay added, so I would like to apply what you have sent and add back > > those tests. For now, I would just patch HEAD though as that's not > > worth the risk of destabilizing stable branches in the buildfarm. Good for me. Thanks! > Agreed to the diagnosis and the fix. The fix reliably cause a restart > point then the restart point manipulats the status files the right way > before the CHECKPOINT command resturns, in the both cases. > > If I would add something to the fix, the following line may need a > comment. > > +# Wait for the checkpoint record is replayed so that the following > +# CHECKPOINT causes a restart point reliably. > |+$standby1->poll_query_until('postgres', > |+ qq{ SELECT pg_wal_lsn_diff(pg_last_wal_replay_lsn(), > '$primary_lsn') >= 0 } Agree. Regards,