From: Stephen Frost <sfrost@snowman.net>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Shulgin, Oleksandr <oleksandr.shulgin@zalando.de>
Cc: Andres Freund <andres@anarazel.de>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Albe Laurenz <laurenz.albe@wien.gv.at>
Cc: Victor Wagner <vitus@wagner.pp.ru>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: Proposal: Implement failover on libpq connect level.
Date: Thu, 3 Sep 2015 11:42:21 -0400
Message-ID: <20150903154221.GJ3685@tamriel.snowman.net> (raw)
In-Reply-To: <CA+TgmoaTYx6nyxLpe+E1cbch98FmXJ6jmoW1ei5iWfEVp5dG_w@mail.gmail.com>
References: <A737B7A37273E048B164557ADEF4A58B50F93B53@ntex2010i.host.magwien.gv.at>
<30615.1439991692@sss.pgh.pa.us>
<CA+Tgmoa++eXswwzPkhRjF-qi4vex74YYGk8BRZW=pB05ic_dvg@mail.gmail.com>
<20150901175010.GP2912@alvherre.pgsql>
<CA+TgmoaqUECxFDEyxLNQetw5uCS7FGhU1-851+rZZwogztbMPw@mail.gmail.com>
<20150901181222.GK31526@awork2.anarazel.de>
<CACACo5Q=5eV3Nw6ai8LJaLXx7R2D=UwWV3DAWdzP+4FJ2Su9EA@mail.gmail.com>
<CA+TgmobFhGkmY=S7yUx1LzoxQcP3pgo9eKPNEkCGEuKv7M9-oQ@mail.gmail.com>
<CACACo5SwSpT8dwTJdQ8QPNxgYbG5un-w=v=cMUZmeb5-mTCbUw@mail.gmail.com>
<CA+TgmoaTYx6nyxLpe+E1cbch98FmXJ6jmoW1ei5iWfEVp5dG_w@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
* Robert Haas (robertmhaas@gmail.com) wrote:
> On Thu, Sep 3, 2015 at 4:00 AM, Shulgin, Oleksandr
> <oleksandr.shulgin@zalando.de> wrote:
> > I believe that having a floating IP for the master is much more practical
> > approach and it doesn't require any patch to libpq or modification of the
> > client connection settings.
>
> I think that's a great approach if all the machines are on the same
> subnet. If they are in different datacenters, it doesn't work.
Anycast could technically be used to address that issue, but there's a
whole host of reasons why that would be quite painful for a PG
connection.
> I think it would be far better to progress to talking about what
> design we'd be comfortable with, rather than kidding ourselves that a
> feature that everyone else has and which somebody has taken the time
> to implement (thus, obviously it has value for them) and which has
> been discussed to general approval at PGCon developer meetings and
> which has been endorsed on this thread by three committers is somehow
> something that nobody really needs. Seriously?
Agreed. For my part, I like the JDBC configuration approach and
definitely would ask that we support 'host:port' options since not all
servers will be on the same port. I don't agree with Tom's concern
regarding the simultaneous connection to all servers at once (yes, it's
a bit unfriendly, but I don't see that as a reason to not provide that
choice and there's a lot of reasons why you'd want it).
What would be nice is a better way to configure these more complicated
options than the single string or even the current very simple
pg_service.conf file. For example, a service name which could define
*other* service names to try along with a plan for how to connect to
them (round robin, simultaneously, read/write only, etc) and perhaps
also support specifying multiple service names to the 'service'
parameter. I'd prefer that we support all different configuration
options through the 'single string' method also, but I'm not convinced
that's a hard requirement.
Thanks!
Stephen
Attachments:
signature.asc (application/pgp-signature, 818B) download
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: sfrost@snowman.net, robertmhaas@gmail.com, oleksandr.shulgin@zalando.de, andres@anarazel.de, alvherre@2ndquadrant.com, 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: <20150903154221.GJ3685@tamriel.snowman.net>
References: <A737B7A37273E048B164557ADEF4A58B50F93B53@ntex2010i.host.magwien.gv.at> <30615.1439991692@sss.pgh.pa.us> <CA+Tgmoa++eXswwzPkhRjF-qi4vex74YYGk8BRZW=pB05ic_dvg@mail.gmail.com> <20150901175010.GP2912@alvherre.pgsql> <CA+TgmoaqUECxFDEyxLNQetw5uCS7FGhU1-851+rZZwogztbMPw@mail.gmail.com> <20150901181222.GK31526@awork2.anarazel.de> <CACACo5Q=5eV3Nw6ai8LJaLXx7R2D=UwWV3DAWdzP+4FJ2Su9EA@mail.gmail.com> <CA+TgmobFhGkmY=S7yUx1LzoxQcP3pgo9eKPNEkCGEuKv7M9-oQ@mail.gmail.com> <CACACo5SwSpT8dwTJdQ8QPNxgYbG5un-w=v=cMUZmeb5-mTCbUw@mail.gmail.com> <CA+TgmoaTYx6nyxLpe+E1cbch98FmXJ6jmoW1ei5iWfEVp5dG_w@mail.gmail.com> <20150903154221.GJ3685@tamriel.snowman.net>
* 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