Re: Proposal: Implement failover on libpq connect level.

Oleksandr Shulgin <oleksandr.shulgin@zalando.de>

From: "Shulgin, Oleksandr" <oleksandr.shulgin@zalando.de>
To: Teodor Sigaev <teodor@sigaev.ru>
Cc: Simon Riggs <simon@2ndquadrant.com>, Andres Freund <andres@anarazel.de>, Tom Lane <tgl@sss.pgh.pa.us>, Albe Laurenz <laurenz.albe@wien.gv.at>, "''Victor Wagner *EXTERN*' *EXTERN*' *EXTERN*" <vitus@wagner.pp.ru>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2015-08-29T13:14:34Z
Lists: pgsql-hackers
On Fri, Aug 28, 2015 at 6:10 PM, Teodor Sigaev <teodor@sigaev.ru> wrote:

> +1 for bringing the jdbc driver URI syntax into libpq, so that all
>> interfaces
>> can be optionally specified this way. This doesn't preclude the use of
>> ipfailover, in fact it might be work well together. If you don't like it,
>> don't
>> use it.
>>
>
> +1
>
> Another thought:  multiple hosts in URI could be used in simple
> configuration for read-only clients. I faced with customers which manages
> two connections in process - to master and to one of several slaves.


Hm, but do they suffer any trouble while doing that *outside* of libpq?
What is the benefit in adding this to libpq itself while it already
provides very rich and finely grained connection control functions?

--
Alex

Commits

  1. libpq: Add target_session_attrs parameter.

  2. Remove superuser checks in pgstattuple

  3. Fix unwanted flushing of libpq's input buffer when socket EOF is seen.