Re: [WIP] pg_ping utility

From: Phil Sorber <phil(at)omniti(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(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-05 05:46:37
Message-ID: CADAkt-iZiBt0oi6q5SSiaYbj0tMn2Jp-32F0yVO1CiSuCDre3Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Dec 3, 2012 at 11:59 PM, Michael Paquier
<michael(dot)paquier(at)gmail(dot)com> wrote:
> 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;

Mystery how those got in there. Fixed.

> - 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.

Fixed. I changed the wording a little too.

> - 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.

So I understand what you mean by the ordering might change, but this
is actual output from the shell. I'm not sure how to convey that
sentiment properly here and still have a real example. Perhaps just
remove the example?

>
> 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

Attachment Content-Type Size
pg_isready_bin_v6.diff application/octet-stream 6.5 KB
pg_isready_docs_v6.diff application/octet-stream 7.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2012-12-05 07:28:12 Re: [WIP] pg_ping utility
Previous Message Karl O. Pinc 2012-12-05 04:40:29 Re: Suggestion for --truncate-tables to pg_restore