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 1lZLyI-0006AR-Vl for pgsql-hackers@arkaria.postgresql.org; Wed, 21 Apr 2021 23:09:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lZLyH-0006OR-UB for pgsql-hackers@arkaria.postgresql.org; Wed, 21 Apr 2021 23:09:25 +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 1lZLyH-0006OH-Eu for pgsql-hackers@lists.postgresql.org; Wed, 21 Apr 2021 23:09:25 +0000 Received: from mail1.dalibo.net ([212.83.143.11] helo=mail.dalibo.com) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lZLyE-0005kZ-N3 for pgsql-hackers@postgresql.org; Wed, 21 Apr 2021 23:09:24 +0000 Received: from firost (larco.ioguix.net [78.202.0.6]) by mail.dalibo.com (Postfix) with ESMTPSA id 1EC941FBC6; Thu, 22 Apr 2021 01:09:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=dalibo.com; s=a; t=1619046560; bh=mOe2CeUYuJ7OPbcAYMpgo5oKpOUtqzk4Hj5ueyZsDxs=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=HSRXksviVmO6mY6n9IpVIP/ANx9aGk0TTC3LKbxCOiJES6RRrIJ6pm+d+q+LzUBpt sZFPXw78NxhSHmT3tDLWFZtfs8cROfGdNCJrYIDzjwL20g11DH9Kkt/x0jXlN60gIT /WPMhl4YEqGNCdQZDz5G9uXLCYzD2ATCItgy8kTg= Date: Thu, 22 Apr 2021 01:09:19 +0200 From: Jehan-Guillaume de Rorthais To: Andres Freund Cc: Stephen Frost , Tom Lane , Magnus Hagander , Robert Haas , Thomas Munro , "pgsql-hackers@postgresql.org" Subject: Re: when the startup process doesn't Message-ID: <20210422010919.4b655015@firost> In-Reply-To: <20210421193605.cubavrq7q5bqkf4i@alap3.anarazel.de> References: <465221.1618879471@sss.pgh.pa.us> <20210420171720.56599607@firost> <631849.1618942988@sss.pgh.pa.us> <20210420185150.GL20766@tamriel.snowman.net> <633337.1618945018@sss.pgh.pa.us> <20210420203642.nvxvolm37f2k6prj@alap3.anarazel.de> <20210421183624.GP20766@tamriel.snowman.net> <20210421193605.cubavrq7q5bqkf4i@alap3.anarazel.de> 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: Archived-At: Precedence: bulk On Wed, 21 Apr 2021 12:36:05 -0700 Andres Freund wrote: > [...] > > I don't think that concern equally applies for what I am proposing > here. For one, we already have minRecoveryPoint in ControlData, and we > already use it for the purpose of determining where we need to recover > to, albeit only during crash recovery. Imo that's substantially > different from adding actual recovery progress status information to the > control file. Just for the record, when I was talking about updating status of the startup in the controldata, I was thinking about setting the last known LSN replayed. Not some kind of variable string. > > I also think that it'd actually be a significant reliability improvement > if we maintained an approximate minRecoveryPoint during normal running: > I've seen way too many cases where WAL files were lost / removed and > crash recovery just started up happily. Only hitting problems months > down the line. Yes, it'd obviously not bullet proof, since we'd not want > to add a significant stream of new fsyncs, but IME such WAL files > lost/removed issues tend not to be about a few hundred bytes of WAL but > many segments missing. Maybe setting this minRecoveryPoint once per segment would be enough, near from the beginning of the WAL. At least, the recovery process would be forced to actually replay until the very last known segment. Regards,