From: Victor Wagner <vitus@wagner.pp.ru>
To: pgsql-hackers@postgresql.org
Subject: Re: Proposal: Implement failover on libpq connect level.
Date: Wed, 19 Aug 2015 20:34:48 +0300
Message-ID: <20150819173448.GA4767@wagner.pp.ru> (raw)
In-Reply-To: <20150820.001735.1312191060652873768.t-ishii@sraoss.co.jp>
References: <20150818041850.GA5092@wagner.pp.ru>
<20150819.124245.1322750734243127189.t-ishii@sraoss.co.jp>
<20150819071009.GC31302@wagner.pp.ru>
<20150820.001735.1312191060652873768.t-ishii@sraoss.co.jp>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
On 2015.08.20 at 00:17:35 +0900, Tatsuo Ishii wrote:
> > But once connection is established, each client works with one
> > server (at least until communication failure occurs and it would call
> > PQreset. In this case it has to reprepare statements anyway).
>
> One downside of this is, if one of the standby servers is not
> responding, every time clients will be blocked by the server before
> giving up the connection trial. This could last for hours (for
This shouldn't happen. My proposal was to connect all servers
simultaneously, and then use that connection which would be established
first closing other ones
Even if we wouldn't do so (to properly randomize server load or to be
compatible with jdbc), there is connection_timeout parameter, so
client wouldn't seat and just wait for hours while system TCP/IP stack
trying to connect nonexistent server.
> example, the network cable is plugged out). I think round robin DNS is
> better because the DNS server will drop the entry corresponding broken
DNS server wouldn't drop anything unless explicitely told so (by
administrator or by some watchdog software which is able to talk
nsupdate protocol).
And not everyone database owner has control on his own domain.
Moreover, DNS is distributed system with agressive caching. If our
system is not local, DNS records for non-existing server would be cached
by DNS servers of client's internet provider.
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: vitus@wagner.pp.ru, pgsql-hackers@postgresql.org
Subject: Re: Proposal: Implement failover on libpq connect level.
In-Reply-To: <20150819173448.GA4767@wagner.pp.ru>
References: <20150818041850.GA5092@wagner.pp.ru> <20150819.124245.1322750734243127189.t-ishii@sraoss.co.jp> <20150819071009.GC31302@wagner.pp.ru> <20150820.001735.1312191060652873768.t-ishii@sraoss.co.jp> <20150819173448.GA4767@wagner.pp.ru>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox