From: Tom Lane <tgl@sss.pgh.pa.us>
To: Noah Misch <noah@leadboat.com>
Cc: pgsql-hackers@postgreSQL.org
Subject: Re: PGCTLTIMEOUT in pg_regress, or skink versus the clock
Date: Wed, 20 Apr 2016 23:58:46 -0400
Message-ID: <14298.1461211126@sss.pgh.pa.us> (raw)
In-Reply-To: <20160421021231.GA2020479@tornado.leadboat.com>
References: <13969.1461191936@sss.pgh.pa.us>
<20160421021231.GA2020479@tornado.leadboat.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
Noah Misch <noah@leadboat.com> writes:
> On Wed, Apr 20, 2016 at 06:38:56PM -0400, Tom Lane wrote:
>> I am thinking that we missed a bet in commit 2ffa86962077c588
>> et al, and that pg_regress's hard-wired 60-second start timeout ought to
>> be overridable from an environment variable just as pg_ctl's timeout is.
>> It might as well be the same environment variable, so I propose the
>> attached patch.
>> Any objections?
> Looks reasonable.
Pushed.
I did some more testing here and concluded that slow postmaster startup is
almost certainly the right explanation for skink's problems. On my
otherwise-idle workstation, postmaster startup under valgrind takes about
10 seconds, of which six or seven seem to involve valgrind just collecting
its thoughts :-(. The postmaster's socket file does not appear until nine
seconds in, and then by ten seconds it is ready to accept connections.
So that's how come I see just one "FATAL: the database system is starting
up" log entry --- pg_regress's previous eight launches of pg_ctl just failed
with "no such socket file". So I now think the observed failures on skink
can be explained by supposing that valgrind sometimes takes around a
minute to start up on that platform. The skink log I quoted before would
fit with the postmaster almost but not quite reaching "ready" status
before pg_ctl's timeout expires. The other two skink failures actually
have empty postmaster log files, suggesting that valgrind was so slow that
we didn't even get to the "database system was shut down" log message.
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
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-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, noah@leadboat.com
Subject: Re: PGCTLTIMEOUT in pg_regress, or skink versus the clock
In-Reply-To: <14298.1461211126@sss.pgh.pa.us>
References: <13969.1461191936@sss.pgh.pa.us> <20160421021231.GA2020479@tornado.leadboat.com> <14298.1461211126@sss.pgh.pa.us>
* 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