From: Andres Freund <andres@anarazel.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Christoph Berg <myon@debian.org>
Cc: Peter J. Holzer <hjp-pgsql@hjp.at>
Cc: pgsql-general@postgresql.org
Cc: Adam Brusselback <adambrusselback@gmail.com>
Subject: Re: Postgres 10.1 fails to start: server did not start in time
Date: Sun, 12 Nov 2017 13:03:09 -0800
Message-ID: <20171112210309.spjszhibtdpginuc@alap3.anarazel.de> (raw)
In-Reply-To: <21519.1510514802@sss.pgh.pa.us>
References: <8027.1510347112@sss.pgh.pa.us>
<20171111132354.esi73rlpq3goyrqh@msg.df7cb.de>
<CAMjNa7c5shJPR9sDz=VwNZz1LoTTi=dhO1CUCDJL=u8+WLL5pg@mail.gmail.com>
<20171111205316.u56lkmkakdmcx6zm@msg.df7cb.de>
<20171112122658.md7u7ahq5raqezft@msg.df7cb.de>
<20171112173559.m6chmbyf4vz6fu3c@hjp.at>
<20171112185233.tzynljip2k3ygcxn@msg.df7cb.de>
<20802.1510513605@sss.pgh.pa.us>
<20171112191844.4rry32vdtxzi6crj@msg.df7cb.de>
<21519.1510514802@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-general>
On 2017-11-12 14:26:42 -0500, Tom Lane wrote:
> Christoph Berg <myon@debian.org> writes:
> > The default systemd timeout seems to be 90s. I have already changed
> > the systemd timeout to infinity (start) and 1h (stop), so only the
> > default pg_ctl timeout remains (60s), which I'd rather not override
> > unilaterally.
>
> > That said, isn't 60s way too small for shutting down larger clusters?
> > And likewise for starting?
>
> Well, that's tied into the fact that pg_ctl doesn't disturb the server's
> state if it gives up waiting. If it did, we would certainly use a larger
> timeout or none at all.
Hm. So partially that's also related to the fact that we didn't have a
good way to know whether the server reacted to the shutdown request or
not. With the infrastructure from
commit f13ea95f9e473a43ee4e1baeb94daaf83535d37c
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2017-06-28 17:31:24 -0400
Change pg_ctl to detect server-ready by watching status in postmaster.pid.
we could really do better than just wonder whether our signal to
shutdown was received or not. There probably should be a quite short
timeout for the server to change status, and then a much longer one for
that shutdown to finish.
> I don't feel a big need to change that default,
> but if you have a surrounding script that is going to take adverse action
> after a timeout then you need to use a larger value ...
Didn't we have to fiddle with this a bunch in the regression tests, to
get things to work properly on slow animals? If we had to do that, other
people had to do so as well. Not the friendliest experience...
Greetings,
Andres Freund
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: andres@anarazel.de, tgl@sss.pgh.pa.us, myon@debian.org, hjp-pgsql@hjp.at, adambrusselback@gmail.com
Subject: Re: Postgres 10.1 fails to start: server did not start in time
In-Reply-To: <20171112210309.spjszhibtdpginuc@alap3.anarazel.de>
References: <8027.1510347112@sss.pgh.pa.us> <20171111132354.esi73rlpq3goyrqh@msg.df7cb.de> <CAMjNa7c5shJPR9sDz=VwNZz1LoTTi=dhO1CUCDJL=u8+WLL5pg@mail.gmail.com> <20171111205316.u56lkmkakdmcx6zm@msg.df7cb.de> <20171112122658.md7u7ahq5raqezft@msg.df7cb.de> <20171112173559.m6chmbyf4vz6fu3c@hjp.at> <20171112185233.tzynljip2k3ygcxn@msg.df7cb.de> <20802.1510513605@sss.pgh.pa.us> <20171112191844.4rry32vdtxzi6crj@msg.df7cb.de> <21519.1510514802@sss.pgh.pa.us> <20171112210309.spjszhibtdpginuc@alap3.anarazel.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox