Re: [PATCH] pg_isready (was: [WIP] pg_ping utility)

From: Craig Ringer <craig(at)2ndQuadrant(dot)com>
To: Phil Sorber <phil(at)omniti(dot)com>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Erik Rijkers <er(at)xs4all(dot)nl>, Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>, Bruce Momjian <bruce(at)momjian(dot)us>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] pg_isready (was: [WIP] pg_ping utility)
Date: 2013-01-27 00:30:18
Message-ID: 5104751A.7000905@2ndQuadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Craig Ringer 2013-01-27 01:27:13 Re: Visual Studio 2012 RC
Previous Message Phil Sorber 2013-01-27 00:16:04 Re: [PATCH] pg_isready (was: [WIP] pg_ping utility)