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 1lYv1v-00058W-AY for pgsql-hackers@arkaria.postgresql.org; Tue, 20 Apr 2021 18:23:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lYv1u-0008LA-69 for pgsql-hackers@arkaria.postgresql.org; Tue, 20 Apr 2021 18:23:22 +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 1lYv1t-0008K4-VC for pgsql-hackers@lists.postgresql.org; Tue, 20 Apr 2021 18:23:21 +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 1lYv1n-0003gI-Hu for pgsql-hackers@postgresql.org; Tue, 20 Apr 2021 18:23:21 +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 13KIN8cm631850; Tue, 20 Apr 2021 14:23:08 -0400 From: Tom Lane To: Magnus Hagander cc: Jehan-Guillaume de Rorthais , Robert Haas , Thomas Munro , "pgsql-hackers@postgresql.org" Subject: Re: when the startup process doesn't In-reply-to: References: <465221.1618879471@sss.pgh.pa.us> <20210420171720.56599607@firost> Comments: In-reply-to Magnus Hagander message dated "Tue, 20 Apr 2021 19:32:33 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <631848.1618942988.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 20 Apr 2021 14:23:08 -0400 Message-ID: <631849.1618942988@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Magnus Hagander writes: > On Tue, Apr 20, 2021 at 5:17 PM Jehan-Guillaume de Rorthais > wrote: >> Two another options: >> 1. if this is limited to local access only, outside of the log entries,= the >> status of the startup could be updated in the controldata file as well.= This >> would allows to watch it without tail-grep'ing logs using eg. pg_contro= ldata. > I think doing so in controldata would definitely make things > complicated for no real reason. Plus controldata has a fixed size (and > has to have), whereas something like this would probably want more > variation than that makes easy. Also, given that pg_control is as critical a bit of data as we have, we really don't want to be writing it more often than we absolutely have to. > There could be a "startup.status" file I guess which would basically > contain the last line of what would otherwise be in the log. But if it > remains a textfile, I'm not sure what the gain is -- you'll just have > to have the dba look in more places than one to find it? It's not like > there's likely to be much other data written to the log during these > times? Yeah, once you are talking about dumping stuff in a file, it's not clear how that's better than progress-messages-in-the-log. People already have a lot of tooling for looking at the postmaster log. I think the point of Robert's other proposal is to allow remote checks of the restart's progress, so local files aren't much of a substitute anyway. regards, tom lane