From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com>, Korry Douglas <korry(dot)douglas(at)enterprisedb(dot)com> |
Cc: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Patch (2): Implement failover on libpq connect level. |
Date: | 2015-10-26 20:28:28 |
Message-ID: | 562E8CEC.5010702@gmx.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-jdbc |
On 10/24/15 7:55 AM, Robert Haas wrote:
> On Fri, Oct 23, 2015 at 4:02 PM, Korry Douglas
> <korry(dot)douglas(at)enterprisedb(dot)com> wrote:
>> When you call pg_is_in_recovery(), you should schema-qualify the function
>> name, just in case some other version of that function exists in the
>> search_path.
>
> I wonder whether it's really a good idea to put this kind of logic
> into libpq at all. I think there was some previous votes against
> doing so, and I tend to agree with that viewpoint. Shouldn't probing
> for the state of the connection be the caller's job, not libpq's? If
> somebody wants to write a wrapper function around this that runs this
> query after connecting - or any other query - they can do so.
Well, earlier there was a debate whether any of this should be in libpq.
I think asking for a read-only or read-write connection would be quite
useful, and there isn't really a lot of room for interpretation that
would lead to a lot of application-specific implementations.
That said, it might still be best to omit this from the first round of
the patch, to simplify the discussion.
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Dunstan | 2015-10-26 20:51:13 | Re: [HACKERS] UTF-32 support in PostgreSQL ? |
Previous Message | Peter Eisentraut | 2015-10-26 20:25:57 | Re: Patch: Implement failover on libpq connect level. |
From | Date | Subject | |
---|---|---|---|
Next Message | Christopher Browne | 2015-10-26 21:02:17 | Re: Patch: Implement failover on libpq connect level. |
Previous Message | Peter Eisentraut | 2015-10-26 20:25:57 | Re: Patch: Implement failover on libpq connect level. |