Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Zuj79-0000Zj-VV for pgsql-hackers@arkaria.postgresql.org; Fri, 06 Nov 2015 15:39:44 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1Zuj79-0004Fc-Ez for pgsql-hackers@arkaria.postgresql.org; Fri, 06 Nov 2015 15:39:43 +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 1Zuj5q-0002nq-OD for pgsql-hackers@postgresql.org; Fri, 06 Nov 2015 15:38:22 +0000 Received: from out.smtp-auth.no-ip.com ([8.23.224.60]) by magus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1Zuj5l-0003cS-Be for pgsql-hackers@postgresql.org; Fri, 06 Nov 2015 15:38:22 +0000 X-No-IP: alvh.no-ip.org@noip-smtp X-Report-Spam-To: abuse@no-ip.com Received: from alvin.alvh.no-ip.org (unknown [200.104.52.149]) (Authenticated sender: alvh.no-ip.org@noip-smtp) by smtp-auth.no-ip.com (Postfix) with ESMTPA id 68D44401693; Fri, 6 Nov 2015 07:38:09 -0800 (PST) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id 8FD72210E; Fri, 6 Nov 2015 12:38:07 -0300 (CLT) Date: Fri, 6 Nov 2015 12:38:07 -0300 From: Alvaro Herrera To: Craig Ringer Cc: Robert Haas , "pgsql-hackers@postgresql.org" Subject: Re: Patch: Implement failover on libpq connect level. Message-ID: <20151106153807.GA6104@alvherre.pgsql> References: <20150818041850.GA5092@wagner.pp.ru> <20151014104151.GA6744@wagner.pp.ru> <562E8C55.9030409@gmx.net> <20151028111839.6e73c68a@fafnir> <56327381.5040108@gmx.net> <56379A44.9080609@gmx.net> <20151105151235.GA21434@wagner.pp.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Pg-Spam-Score: -2.6 (--) 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 Craig Ringer wrote: > On 6 November 2015 at 13:34, Robert Haas wrote: > > >> But some options control how > >> next host should be choosen (i.e. use random order for load-balancing > >> or sequential order for high availability), so they should be specified > >> only once per connect string. > > > > But this seems like a point worthy of consideration. > > This makes me think that trying to wedge this into the current API > using a funky connection string format might be a mistake. > > Lots of these issues would go away if you could provide more than just > a connstring. Yes, I agree. I wonder if the failover aspect couldn't be better covered by something more powerful than a single URI, such as the service file format. Maybe just allow the contents of a service file to be passed as a "connection string", so that the application/environment can continue to maintain the connection info as a string somewhere instead of having to have an actual file. -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers