Re: -d option for pg_isready is broken

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Fabrízio Mello <fabriziomello(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: -d option for pg_isready is broken
Date: 2013-11-20 17:45:23
Message-ID: 528CF533.9070806@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2013-11-20 17:50:56 Re: additional json functionality
Previous Message Josh Berkus 2013-11-20 17:43:41 Re: additional json functionality