Re: -d option for pg_isready is broken - Mailing list pgsql-hackers

From Josh Berkus
Subject Re: -d option for pg_isready is broken
Date
Msg-id 528CF533.9070806@agliodbs.com
Whole thread Raw
In response to -d option for pg_isready is broken  (Josh Berkus <josh@agliodbs.com>)
List pgsql-hackers
On 11/20/2013 01:55 AM, Fujii Masao wrote:
> Yeah, I agree that we should make the logic of pg_isready more future-proof
> in 9.4dev. One idea is to expose internal_ping() as a libpq function. Then,
> instead of just calling PQpingParams(), we can do PQconnectStartParams(),
> libpq-function-version-of-internal_ping(), PQhost(), PQport(), and PQfinish().
> That is, we get to know the host and port information by calling
> PQhost() and PQport(),
> after trying to connect to the server.

+1

This would allow writers of client drivers to implement their own
pg_ping() functions instead of needing to go through the shell (as I
currently do with pg_isready).

-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com



pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Re: additional json functionality
Next
From: Greg Stark
Date:
Subject: Re: additional json functionality