On 01/27/2013 08:16 AM, Phil Sorber wrote:
>
> Craig Ringer wrote:
> > That's what it sounds like - confirming that PostgreSQL is really fully
> > shut down.
> >
> > I'm not sure how you could do that over a protocol connection, myself.
> > I'd just read the postmaster pid from the pidfile on disk and then `kill
> > -0` it in a delay loop until the `kill` command returns failure. This
> > could be a useful convenience utility but I'm not convinced it should be
> > added to pg_isready because it requires local and possibly privileged
> > execution, unlike pg_isready's network based operation. Privileges could
> > be avoided by using an aliveness test other than `kill -0`, but you
> > absolutely have to be local to verify that the postmaster has fully
> > terminated - and it wouldn't make sense for a non-local process to care
> > about this anyway.
> >
>
> Maybe something to add to pg_ctl?
>
That'd make a lot more sense than to pg_isready, yeah.
-- Craig Ringer http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services