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 1jT10q-00028P-9f for pgsql-committers@arkaria.postgresql.org; Mon, 27 Apr 2020 10:29:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jT10o-0004uD-Db for pgsql-committers@arkaria.postgresql.org; Mon, 27 Apr 2020 10:29:18 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jT10o-0004u6-01 for pgsql-committers@lists.postgresql.org; Mon, 27 Apr 2020 10:29:18 +0000 Received: from mail.dalibo.com ([212.85.157.172]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jT10l-00084K-JA for pgsql-committers@lists.postgresql.org; Mon, 27 Apr 2020 10:29:16 +0000 Received: from firost (larco.ioguix.net [82.66.0.6]) by mail.dalibo.com (Postfix) with ESMTPSA id B598221354; Mon, 27 Apr 2020 12:29:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=dalibo.com; s=a; t=1587983350; bh=L+wpcm86AiBjaRCbv2dU5M3ETA704+HG6z/aAbs7tTA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=lrie2yfenYu2Hvz64AEgjtyR6QJgQ1NBQW9R8mDlrSdGsyX4TWeo58659eqGvlqj4 7Iw9LryTBgF3z5Az7UnlmA/HZOIMcNi9ZgSfVNKykkNhzBxBpWjnIqyyiqCqycvJxZ cBNfCr5sdNk0XwjY5v9sd6SNxY/B2javDoLZx7Go= Date: Mon, 27 Apr 2020 12:29:08 +0200 From: Jehan-Guillaume de Rorthais To: Michael Paquier Cc: Kyotaro Horiguchi , pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Fix handling of WAL segments ready to be archived during crash r Message-ID: <20200427122908.0275206c@firost> In-Reply-To: <20200425003114.GB1474@paquier.xyz> References: <20200424005929.GK33034@paquier.xyz> <20200424011437.GA806193@paquier.xyz> <20200424.173021.437425683089236305.horikyota.ntt@gmail.com> <20200425003114.GB1474@paquier.xyz> 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 Sat, 25 Apr 2020 09:31:14 +0900 Michael Paquier wrote: > On Fri, Apr 24, 2020 at 05:30:21PM +0900, Kyotaro Horiguchi wrote: > > I think we can reimplement them by waiting > > pg_stat_archiver.last_failed_wal at least for archive_mode=always > > case. I'm not sure about the case where archive_mode=on, though. > > Yeah, the second case is more tricky, and there is no point to add a > poll query using pg_stat_file() on a .ready file either. I suggested a patch in the original thread, waiting for the LSN gathered on the primary.