Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZS5Tr-00030X-6v for pgsql-hackers@arkaria.postgresql.org; Wed, 19 Aug 2015 15:40:47 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZS5Tq-0005CV-Pa for pgsql-hackers@arkaria.postgresql.org; Wed, 19 Aug 2015 15:40:46 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZS5Tp-0005BZ-Fh for pgsql-hackers@postgresql.org; Wed, 19 Aug 2015 15:40:45 +0000 Received: from 173-164-140-181-sfba.hfc.comcastbusiness.net ([173.164.140.181] helo=fetter.org) by makus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1ZS5Tn-0002dp-1c for pgsql-hackers@postgresql.org; Wed, 19 Aug 2015 15:40:44 +0000 Received: by fetter.org (Postfix, from userid 500) id 6C30F6473E; Wed, 19 Aug 2015 08:40:41 -0700 (PDT) Date: Wed, 19 Aug 2015 08:40:41 -0700 From: David Fetter To: Albe Laurenz Cc: ''Victor Wagner *EXTERN*' *EXTERN*' , "pgsql-hackers@postgresql.org" Subject: Re: Proposal: Implement failover on libpq connect level. Message-ID: <20150819154041.GA16249@fetter.org> References: <20150818041850.GA5092@wagner.pp.ru> <20150819065146.GA31302@wagner.pp.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Pg-Spam-Score: -0.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 On Wed, Aug 19, 2015 at 07:15:30AM +0000, Laurenz Albe wrote: > Victor Wagner wrote: > >> I wonder how useful this is at the present time. > >> > Maybe a better idea would be: > host=db1.myorg.com,db2.myorg.com port=5432,2345 I think if we're going to provide multiple sets of connection info, we should just do that rather than trying to piece them together from constituent parts, where the former looks like: host="service=foo sslmode=require",postgresql://bar.baz/mydb?sslmode=require,"host=quux.corge user=grault port=6433" As far as I can tell, the only way a comma could sneak into these strings is if it were in a database name or similarly bizarre spot, in which case the usual quoting needed to handle it in general should handle it here. It's not clear to me that libpq is the correct place to add this feature, as we have fairly large user bases--the JDBC world, for example--that don't use it. Cheers, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfetter XMPP: david.fetter@gmail.com Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers