From: Andres Freund <andres@anarazel.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Albe Laurenz <laurenz.albe@wien.gv.at>
Cc: ''Victor Wagner *EXTERN*' *EXTERN*' *EXTERN* <vitus@wagner.pp.ru>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: Proposal: Implement failover on libpq connect level.
Date: Wed, 19 Aug 2015 15:46:34 +0200
Message-ID: <20150819134634.GA10770@awork2.anarazel.de> (raw)
In-Reply-To: <30615.1439991692@sss.pgh.pa.us>
References: <20150818041850.GA5092@wagner.pp.ru>
<A737B7A37273E048B164557ADEF4A58B50F92F7C@ntex2010i.host.magwien.gv.at>
<20150819065146.GA31302@wagner.pp.ru>
<A737B7A37273E048B164557ADEF4A58B50F9386F@ntex2010i.host.magwien.gv.at>
<20150819074417.GE31302@wagner.pp.ru>
<A737B7A37273E048B164557ADEF4A58B50F93B53@ntex2010i.host.magwien.gv.at>
<30615.1439991692@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
On 2015-08-19 09:41:32 -0400, Tom Lane wrote:
> In fact, they'd still need to use DNS balancing for Postgres,
> because not everything connects with libpq (think JDBC for instance).
It already does support this though.
https://jdbc.postgresql.org/documentation/head/connect.html :
> Connection Fail-over
>
> To support simple connection fail-over it is possible to define multiple
> endpoints (host and port pairs) in the connection url separated by
> commas. The driver will try to once connect to each of them in order
> until the connection succeeds. If none succeed, a normal connection
> exception is thrown.
>
> The syntax for the connection url is:
>
> jdbc:postgresql://host1:port1,host2:port2/database
> So I think we ought to reject this proposal, full stop. I see no
> reason to re-invent this wheel, and there are good reasons not to.
I don't really buy this argument. Allowing to connect to several
endpoints isn't exactly "new tech" either. A lot of database connectors
do support something very close to the above pgjdbc feature.
Greetings,
Andres Freund
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: andres@anarazel.de, tgl@sss.pgh.pa.us, laurenz.albe@wien.gv.at, vitus@wagner.pp.ru, pgsql-hackers@postgresql.org
Subject: Re: Proposal: Implement failover on libpq connect level.
In-Reply-To: <20150819134634.GA10770@awork2.anarazel.de>
References: <20150818041850.GA5092@wagner.pp.ru> <A737B7A37273E048B164557ADEF4A58B50F92F7C@ntex2010i.host.magwien.gv.at> <20150819065146.GA31302@wagner.pp.ru> <A737B7A37273E048B164557ADEF4A58B50F9386F@ntex2010i.host.magwien.gv.at> <20150819074417.GE31302@wagner.pp.ru> <A737B7A37273E048B164557ADEF4A58B50F93B53@ntex2010i.host.magwien.gv.at> <30615.1439991692@sss.pgh.pa.us> <20150819134634.GA10770@awork2.anarazel.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox