Skip site navigation (1) Skip section navigation (2)

pgsql: Improve corner cases in pg_ctl's newwait-for-postmaster-startup

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Improve corner cases in pg_ctl's newwait-for-postmaster-startup
Date: 2011-05-27 18:13:46
Message-ID: E1QQ1Xe-00071t-V8@gemulon.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committerspgsql-hackers
Improve corner cases in pg_ctl's new wait-for-postmaster-startup code.

With "-w -t 0", we should report "still starting up", not "ok".  If we
fall out of the loop without ever being able to call PQping (because we
were never able to construct a connection string), report "no response",
not "ok".  This gets rid of corner cases in which we'd claim the server
had started even though it had not.

Also, if the postmaster.pid file is not there at any point after we've
waited 5 seconds, assume the postmaster has failed and report that, rather
than almost-certainly-fruitlessly continuing to wait.  The pidfile should
appear almost instantly even when there is extensive startup work to do,
so 5 seconds is already a very conservative figure.  This part is per a
gripe from MauMau --- there might be better ways to do it, but nothing
simple enough to get done for 9.1.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/0bae3bc9be4a025df089f0a0c2f547fa538a97bc

Modified Files
--------------
src/bin/pg_ctl/pg_ctl.c |   19 ++++++++++++++++++-
1 files changed, 18 insertions(+), 1 deletions(-)

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2011-05-27 18:19:25
Subject: Re: How can I check the treatment of bug fixes?
Previous:From: Robert HaasDate: 2011-05-27 18:11:29
Subject: Re: Vacuum, visibility maps and SKIP_PAGES_THRESHOLD

pgsql-committers by date

Next:From: Peter EisentrautDate: 2011-05-27 21:26:35
Subject: pgsql: Drop "meaning" column from error code table
Previous:From: Tom LaneDate: 2011-05-27 16:11:34
Subject: pgsql: Preserve caller's memory context in ProcessCompletedNotifies().

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group