Re: [WIP] pg_ping utility

From: Phil Sorber <phil(at)omniti(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, 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-07 03:56:57
Message-ID: CADAkt-jNnp=F4qCJYF_tCFWDDh+Wn7yxyBwG0wyUSn496JG8oA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Dec 6, 2012 at 8:54 PM, Michael Paquier
<michael(dot)paquier(at)gmail(dot)com> wrote:
>
>
> On Thu, Dec 6, 2012 at 12:29 AM, Phil Sorber <phil(at)omniti(dot)com> wrote:
>>
>> On Wed, Dec 5, 2012 at 8:53 AM, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
>> wrote:
>> > No, I think it is the reference docs on the returned value that must be
>> > fixed. That is, instead of saying that the return value correspond to
>> > the enum values, you should be saying that it will return
>> > <literal>0</literal> if it's okay, 1 in another case and 2 in yet
>> > another case. And then next to the PQping() enum, add a comment that
>> > the values must not be messed around with because pg_isready exposes
>> > them to users and shell scripts.
>>
>> +1 I'm on board with this.
>
> OK. Let's do that and then mark this patch as ready for committer.
> Thanks,

Those changes have been made.

>
> --
> Michael Paquier
> http://michael.otacoo.com

Something I was just thinking about while testing this again. I
mentioned the issue before about someone meaning to put -v and putting
-V instead and it being a potential source of problems. What about
making verbose the default and removing -v and adding -q to make it
quiet? This would also match other tools behavior. I want to get this
wrapped up and I am fine with it as is, but just wanted to ask what
others thought.

Thanks.

Attachment Content-Type Size
pg_isready_bin_v7.diff application/octet-stream 7.1 KB
pg_isready_docs_v7.diff application/octet-stream 7.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2012-12-07 04:02:26 Re: pg_upgrade problem with invalid indexes
Previous Message Pavan Deolasee 2012-12-07 03:51:50 Re: Setting visibility map in VACUUM's second phase