Re: [PATCH] pg_isready (was: [WIP] pg_ping utility) - Mailing list pgsql-hackers

From Craig Ringer
Subject Re: [PATCH] pg_isready (was: [WIP] pg_ping utility)
Date
Msg-id 5104751A.7000905@2ndQuadrant.com
Whole thread Raw
In response to Re: [PATCH] pg_isready (was: [WIP] pg_ping utility)  (Phil Sorber <phil@omniti.com>)
List pgsql-hackers
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




pgsql-hackers by date:

Previous
From: Phil Sorber
Date:
Subject: Re: [PATCH] pg_isready (was: [WIP] pg_ping utility)
Next
From: Craig Ringer
Date:
Subject: Re: Visual Studio 2012 RC