Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZXWeh-00042E-D2 for pgsql-hackers@arkaria.postgresql.org; Thu, 03 Sep 2015 15:42:27 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZXWeg-0004UX-8I for pgsql-hackers@arkaria.postgresql.org; Thu, 03 Sep 2015 15:42:26 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZXWef-0004UR-Qe for pgsql-hackers@postgresql.org; Thu, 03 Sep 2015 15:42:25 +0000 Received: from tamriel.snowman.net ([2001:4830:167b::11]) by magus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1ZXWec-0000Zs-Bg for pgsql-hackers@postgresql.org; Thu, 03 Sep 2015 15:42:24 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 94B8D5F7A5; Thu, 3 Sep 2015 11:42:21 -0400 (EDT) Date: Thu, 3 Sep 2015 11:42:21 -0400 From: Stephen Frost To: Robert Haas Cc: "Shulgin, Oleksandr" , Andres Freund , Alvaro Herrera , Tom Lane , Albe Laurenz , Victor Wagner , "pgsql-hackers@postgresql.org" Subject: Re: Proposal: Implement failover on libpq connect level. Message-ID: <20150903154221.GJ3685@tamriel.snowman.net> References: <30615.1439991692@sss.pgh.pa.us> <20150901175010.GP2912@alvherre.pgsql> <20150901181222.GK31526@awork2.anarazel.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="deK9detHj5CnD8qQ" Content-Disposition: inline In-Reply-To: X-Editor: Vim http://www.vim.org/ X-Info: http://www.snowman.net X-Operating-System: Linux/3.13.0-61-generic (x86_64) X-Uptime: 11:26:45 up 29 days, 23:57, 8 users, load average: 0.27, 0.13, 0.14 User-Agent: Mutt/1.5.21 (2010-09-15) X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org --deK9detHj5CnD8qQ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Robert Haas (robertmhaas@gmail.com) wrote: > On Thu, Sep 3, 2015 at 4:00 AM, Shulgin, Oleksandr > wrote: > > I believe that having a floating IP for the master is much more practic= al > > approach and it doesn't require any patch to libpq or modification of t= he > > client connection settings. >=20 > 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 --deK9detHj5CnD8qQ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJV6GpdAAoJEO1sijiDR2RV/SgQAKKVQgaUYvK0gZpkfRMuX1Xs mcs6urKHq1fTPWzSz8iIQMo9cM5df283kQFpbXbR+sP6C7H2hNvzCpUqmk17Dl2N YQgWCd8ETcZkXWQL9+AExlbajC0vZrmGYTcmdR90xQZ8PCyaCrWSEMIFCTbrdeTR kX6sdO4yll/pWy1GE1CnWPY3X7BSJkf93Br/FdPosyP+Vr+SBavBhzTfpy4M3PJJ T22JusPOQCnbb93uvf1ivm8KeI+UxXh5XdtJ0ScclX3A30LyqTGlOcFR9MuVFdGX iVQQ+eFbswIHlGSJEw9ons+x0YBhnAj0lXoLsxLM5OkLprNEXoJpAKJLhRuV80rT D+gyidT2RQXNu4bhpi72ViWAD7D5b+H/RIW2wXZPz3l7FEIyw6j2WYA3ctKdbzTC r9i0sHCH0ec+PkTD2t8BuaF8caK5V0AKuxfZ3VwVOtw/C5BiXLhHSC0yHZBsfoxW He6L8Qvh/5sjBckdWXW+oL+zrJ+QKs1AJU0evQhnwSurDFrtFxARJTKBC1updNoy 9TgZyprA/8X8yZOpqlmA3mBCvNIJSffxGV6Uf+f6ZGtZaUU+IkwwMtyPrbo9hC9T /SBniyEZ3Ynu5WhaX6tPD+dpTWJ6LvZ53sXTeInzNm6qJ7WyT56e8RbdlcdclopR ruGotFZZ79pXfs3c4o+g =F+Yx -----END PGP SIGNATURE----- --deK9detHj5CnD8qQ--