Re: Proposal: Implement failover on libpq connect level. - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: Proposal: Implement failover on libpq connect level.
Date
Msg-id CAA4eK1K1jxHLL6iEep3TQcb+HAR6kv9pU1oZ2AA-mpJs0FoOuQ@mail.gmail.com
Whole thread Raw
In response to Re: Proposal: Implement failover on libpq connect level.  (Victor Wagner <vitus@wagner.pp.ru>)
Responses Re: Proposal: Implement failover on libpq connect level.  (Victor Wagner <vitus@wagner.pp.ru>)
List pgsql-hackers
On Wed, Aug 19, 2015 at 12:35 PM, Victor Wagner <vitus@wagner.pp.ru> wrote:
On 2015.08.19 at 08:28:32 +0530, Amit Kapila wrote:

> On Tue, Aug 18, 2015 at 9:48 AM, Victor Wagner <vitus@wagner.pp.ru> wrote:
> >
> >
> > Behavoir
> > --------
> >
> > If PQconnectdb encounters connect string with multiple hosts specified,
> > it attempts to establish connection with all these hosts simultaneously,
> > and begins to work with server which responds first, unless
> > loadbalancing parameter is true.
> >
> >
> I think here you are mixing the behaviour for load balancing solution and
> failover solution.  It seems to me that for client-side failover solution
> (which is also known as Transparent Application Failover), the connection
> attempt to second server should be done after the first connection is
> broken as that provide more flexibility.

I think that failover procedure should begin before first connection is
ever established.

As far as I understand, failover gets initiated once the master server goes
down or is not accessible due to some reason, so for such cases if you
have the connection to both the servers then it might not work.


With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

pgsql-hackers by date:

Previous
From: Victor Wagner *EXTERN*
Date:
Subject: Re: Proposal: Implement failover on libpq connect level.
Next
From: Amit Langote
Date:
Subject: Re: Declarative partitioning