From: Tom Lane <tgl@sss.pgh.pa.us>
To: Albe Laurenz <laurenz.albe@wien.gv.at>
Cc: '''Victor Wagner *EXTERN*' *EXTERN*' *EXTERN*' <vitus@wagner.pp.ru>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: Proposal: Implement failover on libpq connect level.
Date: Wed, 19 Aug 2015 09:41:32 -0400
Message-ID: <30615.1439991692@sss.pgh.pa.us> (raw)
In-Reply-To: <A737B7A37273E048B164557ADEF4A58B50F93B53@ntex2010i.host.magwien.gv.at>
References: <20150818041850.GA5092@wagner.pp.ru>
<A737B7A37273E048B164557ADEF4A58B50F92F7C@ntex2010i.host.magwien.gv.at>
<20150819065146.GA31302@wagner.pp.ru>
<A737B7A37273E048B164557ADEF4A58B50F9386F@ntex2010i.host.magwien.gv.at>
<20150819074417.GE31302@wagner.pp.ru>
<A737B7A37273E048B164557ADEF4A58B50F93B53@ntex2010i.host.magwien.gv.at>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
Albe Laurenz <laurenz.albe@wien.gv.at> writes:
> Victor Wagner wrote:
>> It would just take a bit more time for client and a bit more load for
>> server - to make sure that this connection is read-write by
>> issuing
>> show transaction_read_only
>> statement before considering connection useful.
> That's not very comfortable, and a lot of middleware software won't easily
> learn the trick.
That sort-of ties into what seems to me the main objection to this
proposal, namely that there is already a way to do this sort of thing:
DNS-based load balancing. All the clients think they connect to
db.mycompany.com, but which server they actually get is determined by
what IP address the DNS server tells them to use.
This is a technology that is very well established, known to every
large-site admin, and usable for every Internet-based service. Even if
libpq had its own nonstandard way of doing something similar, the site
admins would probably still need to use DNS load balancing for other
services. In fact, they'd still need to use DNS balancing for Postgres,
because not everything connects with libpq (think JDBC for instance).
So I think we ought to reject this proposal, full stop. I see no
reason to re-invent this wheel, and there are good reasons not to.
regards, tom lane
--
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: tgl@sss.pgh.pa.us, laurenz.albe@wien.gv.at, vitus@wagner.pp.ru, pgsql-hackers@postgresql.org
Subject: Re: Proposal: Implement failover on libpq connect level.
In-Reply-To: <30615.1439991692@sss.pgh.pa.us>
References: <20150818041850.GA5092@wagner.pp.ru> <A737B7A37273E048B164557ADEF4A58B50F92F7C@ntex2010i.host.magwien.gv.at> <20150819065146.GA31302@wagner.pp.ru> <A737B7A37273E048B164557ADEF4A58B50F9386F@ntex2010i.host.magwien.gv.at> <20150819074417.GE31302@wagner.pp.ru> <A737B7A37273E048B164557ADEF4A58B50F93B53@ntex2010i.host.magwien.gv.at> <30615.1439991692@sss.pgh.pa.us>
* 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