On Sun, Jan 20, 2013 at 2:59 PM, Phil Sorber <p...@omniti.com> wrote:
> Ok. I can add something to the notes section of the docs. I can also
> add some code comments for this and for grabbing the default params.

Sounds good.

>> Oh, I see.  Is it really important to have the host and port in the
>> output, or should we trim that down to just e.g. "accepting
>> connections"?  It seems useful to have that if a human is looking at
>> the output, but maybe not if a machine is looking at the output.  And
>> if somebody doesn't want it, getting rid of it with sed or awk is
>> nontrivial - imagine:
>>
>> pg_isready -d "/tmp:5432 - accepting connections"
>
> If you are scripting I'd assume you would use the return code value.
> It might be reasonable to make adding the host and port the verbose
> method and have just "accepting connections" as the default output,
> but my concern there is a misdiagnosis because someone doesn't realize
> what server they are connecting to. This way they can't miss it and
> they don't have to add another command line option to get that output.

It's a fair concern.  Does anyone else have an opinion on this?

> The other thing I thought about when you mentioned this is not doing
> the default lookups if it's in quiet mode. I could move things around
> to accomplish this, but not sure it is worth the effort and
> complexity. Thoughts?

That doesn't seem to buy us anything.  I'm fine with the code, now
that I see what it's intended to do.  It doesn't cost anything
noticeable in terms of efficiency; I think, I just didn't want to make
things complicated without a reason.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to