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