Re: [WIP] pg_ping utility

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Phil Sorber <phil(at)omniti(dot)com>
Cc: Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Bruce Momjian <bruce(at)momjian(dot)us>, PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [WIP] pg_ping utility
Date: 2012-12-04 04:59:15
Message-ID: CAB7nPqR_C8N8Ajek5uMp8UmMQXEtz7mPBr3FkbnYsbx2dG-yYw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Dec 2, 2012 at 5:56 AM, Phil Sorber <phil(at)omniti(dot)com> wrote:

> Here is the updated patch. I renamed it, but using v5 to stay consistent.
>

After looking at this patch, I found the following problems:
- There are a couple of whitespaces still in the code, particularly at the
end of those lines
+ const char *pguser = NULL;
+ const char *pgdbname = NULL;
- When describing the values that are returned by pg_isready, it is awkward
to refer to the returning values as plain integers as those values are part
of an enum. You should add references to PQPING_OK, PQPING_REJECT,
PQPING_NO_RESPONSE and PQPING_NO_ATTEMPT instead. Also add to reference
links in the docs redirecting to them, with things of the type <xref
linkend="libpq-pqpingparams-pqping-ok"> or related.
- Same thing with this example:
+ <para>
+ Standard Usage:
+ <screen>
+ <prompt>$</prompt> <userinput>pg_isready</userinput>
+ <prompt>$</prompt> <userinput>echo $?</userinput>
+ <computeroutput>0</computeroutput>
+ </screen>
+ </para>
For the time being PQPING_OK returns 0 because it is on top of the enum
PGPing, but this might change if for a reason or another the order of
outputs is changed.

Once those things are fixed, I think this will be ready for committer
review as everybody here seem to agree with your approach.
--
Michael Paquier
http://michael.otacoo.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Etsuro Fujita 2012-12-04 05:52:12 Re: Patch for removng unused targets
Previous Message Bruce Momjian 2012-12-04 04:47:48 Re: In pg_upgrade, remove 'set -x' from test script.