Re: Patch: Implement failover on libpq connect level.
Tsunakawa, Takayuki <tsunakawa.takay@jp.fujitsu.com>
From: "Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>
To: 'Robert Haas' <robertmhaas@gmail.com>, Mithun Cy <mithun.cy@enterprisedb.com>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>, Peter van Hardenberg <pvh@pvh.ca>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2016-11-17T02:56:32Z
Lists: pgsql-hackers
From: pgsql-hackers-owner@postgresql.org
> [mailto:pgsql-hackers-owner@postgresql.org] On Behalf Of Robert Haas
> Hmm, let's go back to the JDBC method, then. "show transaction_read_only"
> will return true on a standby, but presumably also on any other non-writable
> node. You could even force it to be true artificially if you wanted to
> force traffic off of a node, using ALTER {SYSTEM|USER ...|DATABASE ..} SET
> default_transaction_read_only = on
>
> I think that would address Alvaro's concern, and it's nicer anyway if libpq
> and JDBC are doing the same thing.
If you prefer consistency between libpq and JDBC, then we could correct JDBC. People here should know the server state well, and be able to figure out a good specification.
Regards
Takayuki Tsunakawa
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