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

From Fujii Masao
Subject Re: [COMMITTERS] pgsql: Improve corner cases in pg_ctl's new wait-for-postmaster-startup
Date
Msg-id BANLkTikOwTEZYoYUq9jDC5HeA73BoSjMGg@mail.gmail.com
Whole thread Raw
In response to Re: [COMMITTERS] pgsql: Improve corner cases in pg_ctl's new wait-for-postmaster-startup  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [COMMITTERS] pgsql: Improve corner cases in pg_ctl's new wait-for-postmaster-startup
List pgsql-hackers
On Wed, Jun 1, 2011 at 12:30 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> 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.
>
> I find myself unimpressed by this approach, because it supposes that the
> postmaster got as far as creating postmaster.pid.

Sorry, I could not understand the reason why you were unimpressed.
Could you explain it in a little more detail?

> My preference for fixing this would be to arrange for the postmaster to
> be the direct child of pg_ctl, so that we could watch for SIGCHLD to
> detect premature postmaster exit.  Right now that doesn't work because
> we are invoking an intermediate shell via system(), but I think that
> could be avoided with a bit more effort (ie, an explicit fork and exec).
> Not sure how that all translates into Windows-ville, though.

Yeah, it sounds difficult to implement that for Windows. pg_ctl might
need to invoke the thread for receiving the SIGCHLD, like the server
does.

Regards,

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


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [PERFORM] Hash Anti Join performance degradation
Next
From: Peter Eisentraut
Date:
Subject: Re: Getting a bug tracker for the Postgres project