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 1lZHpH-0005BI-7a for pgsql-hackers@arkaria.postgresql.org; Wed, 21 Apr 2021 18:43:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lZHpF-0006cJ-4a for pgsql-hackers@arkaria.postgresql.org; Wed, 21 Apr 2021 18:43:49 +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 1lZHpE-0006cC-U9 for pgsql-hackers@lists.postgresql.org; Wed, 21 Apr 2021 18:43:48 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lZHpC-0000nB-E1 for pgsql-hackers@postgresql.org; Wed, 21 Apr 2021 18:43:48 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 13LIhUOc792088; Wed, 21 Apr 2021 14:43:30 -0400 From: Tom Lane To: Stephen Frost cc: Andres Freund , Magnus Hagander , Jehan-Guillaume de Rorthais , Robert Haas , Thomas Munro , "pgsql-hackers@postgresql.org" Subject: Re: when the startup process doesn't In-reply-to: <20210421183624.GP20766@tamriel.snowman.net> 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> Comments: In-reply-to Stephen Frost message dated "Wed, 21 Apr 2021 14:36:24 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <792086.1619030610.1@sss.pgh.pa.us> Date: Wed, 21 Apr 2021 14:43:30 -0400 Message-ID: <792087.1619030610@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Stephen Frost writes: > * Andres Freund (andres@anarazel.de) wrote: >> On 2021-04-20 14:56:58 -0400, Tom Lane wrote: >>> I wonder though whether we really need authentication here. pg_ping >>> already exposes whether the database is up, to anyone who can reach the >>> postmaster port at all. Would it be so horrible if the "can't accept >>> connections" error message included a detail about "recovery is X% >>> done"? >> Unfortunately I think something like a percentage is hard to calculate >> right now. > While it obviously wouldn't be exactly accurate, I wonder if we couldn't > just look at the WAL files we have to reply and then guess that we'll go > through about half of them before we reach the end..? I mean, wouldn't > exactly be the first time that a percentage progress report wasn't > completely accurate. :) Or we could skip all the guessing and just print something like what the startup process exposes in ps status, ie "currently processing WAL file so-and-so". regards, tom lane