Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZXXvw-0008O9-Ph for pgsql-hackers@arkaria.postgresql.org; Thu, 03 Sep 2015 17:04:20 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZXXvw-0006Ew-8O for pgsql-hackers@arkaria.postgresql.org; Thu, 03 Sep 2015 17:04:20 +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 1ZXXvu-0006EA-W3 for pgsql-hackers@postgresql.org; Thu, 03 Sep 2015 17:04:19 +0000 Received: from smtp-auth.no-ip.com ([8.23.224.61] helo=out.smtp-auth.no-ip.com) by makus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1ZXXvr-0008Tw-JK for pgsql-hackers@postgresql.org; Thu, 03 Sep 2015 17:04:17 +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.169.63]) (Authenticated sender: alvh.no-ip.org@noip-smtp) by smtp-auth.no-ip.com (Postfix) with ESMTPA id 328FA401018; Thu, 3 Sep 2015 10:04:08 -0700 (PDT) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id 4F52411BC; Thu, 3 Sep 2015 14:04:06 -0300 (CLT) Date: Thu, 3 Sep 2015 14:04:06 -0300 From: Alvaro Herrera To: "Shulgin, Oleksandr" Cc: Robert Haas , Stephen Frost , Andres Freund , Tom Lane , Albe Laurenz , Victor Wagner , "pgsql-hackers@postgresql.org" Subject: Re: Proposal: Implement failover on libpq connect level. Message-ID: <20150903170406.GD2912@alvherre.pgsql> References: <20150901175010.GP2912@alvherre.pgsql> <20150901181222.GK31526@awork2.anarazel.de> <20150903154221.GJ3685@tamriel.snowman.net> 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 Shulgin, Oleksandr wrote: > > Alternatively, change the rules for parsing the existing host=X > > parameter so that we split it on some separator that isn't a valid > > hostname character, and then strip off an optional :port syntax from > > each entry; that value, if present, overrides port=X for that entry. > > It's tempting to use ':' as the separator here, but it's still valid for > directory names and host can be one in case of UN*X sockets. I think that's rare enough that we could just say that if you want to have a : in a directory name used for local connections, you have to escape the : character. This is going to be pretty easy to detect as a problem because of the obvious error message ("cannot parse "pg" in /usr/sockets:pg as a port number"), except in the even rarer case that the only stuff after the colon is digits. -- Á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