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 1nW1UQ-0001eX-Lr for pgsql-docs@arkaria.postgresql.org; Sun, 20 Mar 2022 19:45:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nW1UP-0004iv-Et for pgsql-docs@arkaria.postgresql.org; Sun, 20 Mar 2022 19:45:21 +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 1nW1UP-0004im-7t for pgsql-docs@lists.postgresql.org; Sun, 20 Mar 2022 19:45:21 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nW1UM-0003DM-T7 for pgsql-docs@lists.postgresql.org; Sun, 20 Mar 2022 19:45:20 +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 22KJj9U51569339; Sun, 20 Mar 2022 15:45:09 -0400 From: Tom Lane To: Justin Pryzby cc: jordan@jwillikers.com, pgsql-docs@lists.postgresql.org Subject: Re: systemd service start - disable timeout with "infinity" In-reply-to: <20220320193629.GW28503@telsasoft.com> References: <164770078557.670.5467111518383664377@wrigleys.postgresql.org> <1445301.1647792679@sss.pgh.pa.us> <20220320193629.GW28503@telsasoft.com> Comments: In-reply-to Justin Pryzby message dated "Sun, 20 Mar 2022 14:36:29 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1569337.1647805509.1@sss.pgh.pa.us> Date: Sun, 20 Mar 2022 15:45:09 -0400 Message-ID: <1569338.1647805509@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Justin Pryzby writes: > On Sun, Mar 20, 2022 at 12:11:19PM -0400, Tom Lane wrote: >> Hmm ... maybe zero works too, or worked when this was written? >> But you're right that "infinity" is now the documented way >> to do it. Will fix, thanks for the report. > +# 0 is the same as infinity, but "infinity" needs systemd 229 Ah, thanks for the data point. 229 is far enough back that I'm not too troubled about that; besides, since this is just a documentation example, clarity is more important. BTW, what I read in the systemd docs is that TimeoutSec is a shorthand for setting both TimeoutStartSec and TimeoutStopSec, so the code in our RPMs looks a bit dubious now: # Do not set any timeout value, so that systemd will not kill postmaster # during crash recovery. TimeoutSec=0 +# 0 is the same as infinity, but "infinity" needs systemd 229 +TimeoutStartSec=0 + +TimeoutStopSec=1h + [Install] This is making assumptions about what order the values are applied in, plus the initial comment is no longer very accurate. regards, tom lane