From: Haribabu Kommi [mailto:kommi.harib...@gmail.com] > Thanks for finding out the problem, how about the following way of checking > for prefer-read/prefer-standby. > > 1. (default_transaction_read_only = true and recovery = true) > > 2. If none of the host satisfies the above scenario, then recovery = true > 3. Last check is for default_transaction_read_only = true
That would be fine. But as I mentioned in another mail, I think "get read-only session" and "connect to standby" differ. So I find it better to separate parameters for those request; target_session_attr and target_server_type. Regards Takayuki Tsunakawa