Re: Proposal: Implement failover on libpq connect level.

From: Oleg Bartunov <obartunov(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>, "''Victor Wagner *EXTERN*' *EXTERN*' *EXTERN*" <vitus(at)wagner(dot)pp(dot)ru>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposal: Implement failover on libpq connect level.
Date: 2015-08-19 14:11:33
Message-ID: CAF4Au4zXOPERAQcLbyMLrPA0mLegrUKMq3N5YuuGtc2GUsACyQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-jdbc

On Wed, Aug 19, 2015 at 4:46 PM, Andres Freund <andres(at)anarazel(dot)de> wrote:

> 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
>

yes, I also wanted to show this, but you was quicker.

>
>
> > 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.
>

mysql, for example.

>
> Greetings,
>
> Andres Freund
>
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2015-08-19 14:35:17 Re: Proposal: Implement failover on libpq connect level.
Previous Message Andres Freund 2015-08-19 14:08:24 Re: Make HeapTupleSatisfiesMVCC more concurrent

Browse pgsql-jdbc by date

  From Date Subject
Next Message Simon Riggs 2015-08-19 14:35:17 Re: Proposal: Implement failover on libpq connect level.
Previous Message Andres Freund 2015-08-19 13:46:34 Re: Proposal: Implement failover on libpq connect level.