Re: Patch: Implement failover on libpq connect level.
Alvaro Herrera <alvherre@2ndquadrant.com>
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Craig Ringer <craig@2ndquadrant.com>
Cc: Robert Haas <robertmhaas@gmail.com>,
"pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2015-11-06T15:38:07Z
Lists: pgsql-hackers
Craig Ringer wrote: > On 6 November 2015 at 13:34, Robert Haas <robertmhaas@gmail.com> 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
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