Re: Patch: Implement failover on libpq connect level.
Craig Ringer <craig@2ndquadrant.com>
From: Craig Ringer <craig@2ndquadrant.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2015-11-06T05:43:33Z
Lists: pgsql-hackers
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. >> Third category of options are specified per-cluster much more often >> than per node. But are quite often changed from compiled in default. > > This, too. Like this. If you have a global set of connection options, then per-connection options, it's a lot simpler. I guess that can be hacked in with a more dramatic change in the connstring format, otherwise, incorporating subsections or something. I'm not keen on doing anything like that, but there are all sorts of options... "global:[user=fred port=5432] host1:[host=somehost user=user1] host2:[host=localhost]" (puts head in brown paper bag) -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, 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