Re: Patch: Implement failover on libpq connect level.
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Peter van Hardenberg <pvh@pvh.ca>, Peter Eisentraut <peter_e@gmx.net>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2016-10-25T17:23:51Z
Lists: pgsql-hackers
On Mon, Oct 24, 2016 at 4:40 PM, Alvaro Herrera <alvherre@2ndquadrant.com> wrote: > Umm, my recollection regarding IPv6 parsing in the URI syntax is that > those must appear inside square brackets -- it's not valid to have the > IPv6 address outside brackets, and the port number is necessarily > outside the brackets. So there's no ambiguity. If the current patch is > allowing IPv6 address to appear outside of brackets, that seems like a > bug to me. I agree. > The string conninfo spec should not accept port numbers in the "host" > part. (Does it?) Not currently, but the proposed patch would cause it to do so. >> So now I think that to make this work correctly, we're going to need >> to change both the URL parser and also add parsing for the host and >> port. Let's say the user says this: >> >> postgresql://[1::2]:3,[4::5],[6::7]::8/ > > (There's a double colon before 8, I suppose that's just a typo.) Oh, yeah. Right. >> It is not obvious what it means if there are multiple ports but the >> number doesn't equal the number of hosts. > > I think we should reject the case of differing number of elements and > neither host nor port is a singleton, as an error. The suggestion to > ignore some parts seems too error-prone. OK, can do. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
Commits
-
libpq: Add target_session_attrs parameter.
- 721f7bd3cbcc 10.0 landed
-
Remove superuser checks in pgstattuple
- fd321a1dfd64 10.0 cited
-
Fix unwanted flushing of libpq's input buffer when socket EOF is seen.
- c405918858c0 9.6.0 cited