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

Re: [COMMITTERS] pgsql: Improve corner cases in pg_ctl's new wait-for-postmaster-startup

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [COMMITTERS] pgsql: Improve corner cases in pg_ctl's new wait-for-postmaster-startup
Date: 2011-06-01 03:19:16
Message-ID: BANLkTi=xnvH+fn2Xnqi74MojDusPSp7K8Q@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-committerspgsql-hackers
On Sat, May 28, 2011 at 3:13 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> 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.

The postmaster.pid can remain even after the server dies, for example,
in the case where it dies with PANIC or SIGKILL. To address this corner
case, we should check whether postmaster is really running by sending
the signal 0 after we read postmater.pid file? Attached patch does that.

Regards,

-- 
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

Attachment: pg_ctl_change_v1.patch
Description: text/x-patch (483 bytes)

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2011-06-01 03:30:50
Subject: Re: [COMMITTERS] pgsql: Improve corner cases in pg_ctl's new wait-for-postmaster-startup
Previous:From: Robert HaasDate: 2011-06-01 02:58:16
Subject: Re: [PERFORM] Hash Anti Join performance degradation

pgsql-committers by date

Next:From: Tom LaneDate: 2011-06-01 03:30:50
Subject: Re: [COMMITTERS] pgsql: Improve corner cases in pg_ctl's new wait-for-postmaster-startup
Previous:From: Greg StarkDate: 2011-05-31 23:57:24
Subject: Re: pgsql: Protect GIST logic that assumes penalty values can't be negative

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