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 1mVgsq-0004td-Db for pgsql-hackers@arkaria.postgresql.org; Wed, 29 Sep 2021 21:12:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mVgsp-0005MC-7Y for pgsql-hackers@arkaria.postgresql.org; Wed, 29 Sep 2021 21:12:55 +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 1mVgsp-0005Lz-0G for pgsql-hackers@lists.postgresql.org; Wed, 29 Sep 2021 21:12:55 +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 1mVgsm-0006Xs-Gx for pgsql-hackers@postgresql.org; Wed, 29 Sep 2021 21:12:54 +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 18TLCjwS3002164; Wed, 29 Sep 2021 17:12:45 -0400 From: Tom Lane To: Robert Haas cc: Alvaro Herrera , Nitin Jadhav , Justin Pryzby , Michael Paquier , Bharath Rupireddy , Andres Freund , Stephen Frost , Magnus Hagander , Thomas Munro , "pgsql-hackers@postgresql.org" Subject: Re: when the startup process doesn't (logging startup delays) In-reply-to: References: <202109291749.ejyaab7wazx7@alvherre.pgsql> <2992585.1632938816@sss.pgh.pa.us> Comments: In-reply-to Robert Haas message dated "Wed, 29 Sep 2021 16:59:09 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3002162.1632949965.1@sss.pgh.pa.us> Date: Wed, 29 Sep 2021 17:12:45 -0400 Message-ID: <3002163.1632949965@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Robert Haas writes: > On Wed, Sep 29, 2021 at 2:06 PM Tom Lane wrote: >> The real comment I'd have here, though, is that writing one-off >> code for this purpose is bad. If we have a need for a repetitive >> timeout, it'd be better to add the feature to timeout.c explicitly. >> That would probably also remove the need for extra copies of the >> timeout time. > I'm not sure that really helps very much, honestly. I didn't claim there are any other places that could use the feature *today*. But once we've got one, it seems like there could be more tomorrow. In any case, I dislike keeping timeout state data outside timeout.c, because it's so likely to get out-of-sync that way. regards, tom lane