Re: systemd service start - disable timeout with "infinity"

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Justin Pryzby <pryzby(at)telsasoft(dot)com>
Cc: jordan(at)jwillikers(dot)com, pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: Re: systemd service start - disable timeout with "infinity"
Date: 2022-03-20 19:45:09
Message-ID: 1569338.1647805509@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

Justin Pryzby <pryzby(at)telsasoft(dot)com> 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

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message PG Doc comments form 2022-03-21 10:09:55 SQL "RETURNING * | output_expression [ [ AS ]" is wrong
Previous Message Justin Pryzby 2022-03-20 19:36:29 Re: systemd service start - disable timeout with "infinity"