Re: -d option for pg_isready is broken

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Fabrízio Mello <fabriziomello(at)gmail(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: -d option for pg_isready is broken
Date: 2013-11-21 12:58:41
Message-ID: CAHGQGwFHAJofv_Ctts0Dg+CFbvULo0y__Fh45HqwrqT_dwEzEg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Nov 21, 2013 at 6:41 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Wed, Nov 20, 2013 at 4:55 AM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
>>> Not that I can see, but it's not very future-proof. If libpq changes
>>> its idea of what will provoke database-name expansion, this will again
>>> be broken.
>>
>> 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.
>
> Hmm, that sounds like a possibly promising approach.
>
>> But we cannot use this idea in 9.3 because it's too late to add new
>> libpq function there.
>> Also I don't think that the minor version release would change that
>> libpq's logic in 9.3.
>> So, barring any objections, I will commit the latest version of the
>> patch in 9.3.
>
> I think you should commit it to both master and REL9_3_STABLE.

Committed.

> Then,
> you can make further changes to master in a subsequent commit.

Yeah, I will implement that patch.

Regards,

--
Fujii Masao

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2013-11-21 13:06:07 Re: [PATCH] Store Extension Options
Previous Message Heikki Linnakangas 2013-11-21 12:44:29 Re: Handling GIN incomplete splits