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

Bruce Momjian <bruce@momjian.us>

From: Bruce Momjian <bruce@momjian.us>
To: Phil Sorber <phil@omniti.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Robert Haas <robertmhaas@gmail.com>, Craig Ringer <craig@2ndquadrant.com>, Michael Paquier <michael.paquier@gmail.com>, Erik Rijkers <er@xs4all.nl>, Alvaro Herrera <alvherre@2ndquadrant.com>, Dimitri Fontaine <dimitri@2ndquadrant.fr>, Peter Eisentraut <peter_e@gmx.net>, PostgreSQL-development Hackers <pgsql-hackers@postgresql.org>
Date: 2013-01-23T19:51:01Z
Lists: pgsql-hackers
On Wed, Jan 23, 2013 at 02:50:01PM -0500, Phil Sorber wrote:
> On Wed, Jan 23, 2013 at 1:58 PM, Bruce Momjian <bruce@momjian.us> wrote:
> > On Wed, Jan 23, 2013 at 12:27:45PM -0500, Tom Lane wrote:
> >> Phil Sorber <phil@omniti.com> writes:
> >> > On Wed, Jan 23, 2013 at 11:07 AM, Robert Haas <robertmhaas@gmail.com> wrote:
> >> >> [rhaas pgsql]$ pg_isready -h www.google.com
> >> >> <grows old, dies>
> >>
> >> > Do you think we should have a default timeout, or only have one if
> >> > specified at the command line?
> >>
> >> +1 for default timeout --- if this isn't like "ping" where you are
> >> expecting to run indefinitely, I can't see that it's a good idea for it
> >> to sit very long by default, in any circumstance.
> >
> > FYI, the pg_ctl -w (wait) default is 60 seconds:
> >
> >         from pg_ctl.c:
> >
> >         #define DEFAULT_WAIT    60
> >
> 
> Great. That is what I came to on my own as well. Figured that might be
> a sticking point, but as there is precedent, I'm happy with it.

Yeah, being able to point to precedent is always helpful.

-- 
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +