Re: Proposal: Implement failover on libpq connect level.

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: "Shulgin, Oleksandr" <oleksandr(dot)shulgin(at)zalando(dot)de>, Andres Freund <andres(at)anarazel(dot)de>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>, Victor Wagner <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-09-04 23:43:03
Message-ID: 20150904234303.GA10148@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-jdbc

On Thu, Sep 3, 2015 at 10:56:42AM -0400, Robert Haas wrote:
> The amount of opposition to this feature is remarkable considering
> that it's available in Oracle, SQL Server, MongoDB, Cassandra, and
> MySQL. See for example:
>
> http://docs.mongodb.org/manual/reference/connection-string/
> https://datastax.github.io/python-driver/getting_started.html
>
> This is a small patch with minimal to no downside implementing a
> feature that is present in most or all of the major competing
> products. We're really doing ourselves a disservice if we reject it.
> I think it would be far better to progress to talking about what
> design we'd be comfortable with, rather than kidding ourselves that a
> feature that everyone else has and which somebody has taken the time
> to implement (thus, obviously it has value for them) and which has
> been discussed to general approval at PGCon developer meetings and
> which has been endorsed on this thread by three committers is somehow
> something that nobody really needs. Seriously?

As much as I like to disagree with Robert, I can't in this case. ;-)

It is annoying for less capable database to say they have high
availability when that just involves having a client library that can
connect to multiple hosts. Yes, we can do this in DNS, but that is all
happening at a different layer.

Now, the counter-argument is that this is the wrong layer to do it, and
we will end up adding tons of configurations variables to libpq to
control this.

We are clearly not adding this just because JDBC has it --- we are
adding it because it allows for more complex server configurations.
Could this ability be more powerfully done with DNS or a connection
pooler, yes, but not everyone wants that complexity. For me, this libpq
change has a simple user API with a small amount of code change that
give us a simple solution to a common problem.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2015-09-05 00:31:47 Re: WIP: SCRAM authentication
Previous Message Ozgun Erdogan 2015-09-04 22:52:49 Re: Horizontal scalability/sharding

Browse pgsql-jdbc by date

  From Date Subject
Next Message Victor Wagner 2015-09-06 19:27:10 Discussion summary: Proposal: Implement failover on libpq connect level.
Previous Message Shulgin, Oleksandr 2015-09-04 04:08:03 Re: Proposal: Implement failover on libpq connect level.