Re: Proposal: Implement failover on libpq connect level.

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: PostgreSQL - Hans-Jürgen Schönig <postgres(at)cybertec(dot)at>
Cc: Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>, "Victor Wagner *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-18 16:37:58
Message-ID: CA+Tgmobv3Ud6V2b3F1fiPsP+DM60cpwLcXwzpFLgy1dn3O652A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-jdbc

On Tue, Aug 18, 2015 at 6:07 AM, PostgreSQL - Hans-Jürgen Schönig
<postgres(at)cybertec(dot)at> wrote:
>> On 18 Aug 2015, at 11:19, Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at> wrote:
>>
>> Hans-Jürgen Schönig wrote:
>>> in addition to that you have the “problem” of transactions. if you failover in the middle
>>> of a transaction, strange things might happen from the application point of view.
>>>
>>> the good thing, however, is that stupid middleware is sometimes not able to handle
>>> failed connections. however, overall i think it is more of a danger than a benefit.
>>
>> Maybe I misunderstood the original proposal, but my impression was that the alternative
>> servers would be tried only at the time the connection is established, and there would be no
>> such problems as you describe.
>
> it would still leave the problem of having a read only on the other side unless you are using BDR or so.

That doesn't make this a bad idea. Some people are using replication
solutions that can cope with this already (EDB has a proprietary
product, and I'm sure there are people using BDR, too) and, as the
solutions get better and more widely deployed, more people will want
to do it.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2015-08-18 16:47:28 Re: WIP: SCRAM authentication
Previous Message Robert Haas 2015-08-18 16:35:22 Re: allowing wal_level change at run time

Browse pgsql-jdbc by date

  From Date Subject
Next Message Jaime Casanova 2015-08-18 16:53:28 Re: Proposal: Implement failover on libpq connect level.
Previous Message PostgreSQL - Hans-Jürgen Schönig 2015-08-18 10:07:10 Re: Proposal: Implement failover on libpq connect level.