Re: Automatic Client Failover - Mailing list pgsql-hackers

From daveg
Subject Re: Automatic Client Failover
Date
Msg-id 20080805005624.GQ4818@sonic.net
Whole thread Raw
In response to Re: Automatic Client Failover  ("Jonah H. Harris" <jonah.harris@gmail.com>)
List pgsql-hackers
On Mon, Aug 04, 2008 at 05:17:59PM -0400, Jonah H. Harris wrote:
> On Mon, Aug 4, 2008 at 5:08 PM, Simon Riggs <simon@2ndquadrant.com> wrote:
> > When primary server fails, it would be good if the clients connected to
> > the primary knew to reconnect to the standby servers automatically.
> 
> This would be a nice feature which many people I've talked to have
> asked for.  In Oracle-land, it's called Transparent Application
> Failover (TAF) and it gives you a lot of options, including the
> ability to write your own callbacks when a failover is detected.

This might be better done as part of a proxy server, eg pgbouncer, pgpool
than as part of postgresql or libpq. I like the concept, but the logic to
determine when a failover has occurred is complex and a client will often
not have access to enough information to make this determination accurately.

postgresql could have hooks to support this though, ie to determine when a
standby thinks it has become the master.

-dg

-- 
David Gould       daveg@sonic.net      510 536 1443    510 282 0869
If simplicity worked, the world would be overrun with insects.


pgsql-hackers by date:

Previous
From: Jens-Wolfhard Schicke
Date:
Subject: Re: DROP DATABASE always seeing database in use
Next
From: daveg
Date:
Subject: Re: Mini improvement: statement_cost_limit