On Thursday, March 23, 2017 4:50:20 AM EDT Magnus Hagander wrote:
> We should probably consider if there is some way we can implement
> these two things the same way. If we're inventing a new variable that
> gets pushed on each connection, perhaps we can use that one and avoid
> the SHOW command? Is the read-write thing really interesting in the
> aspect of the general case, or is it more about detectinv readonly
> standbys as well? Or to flip that, would sending the
> transaction_read_only parameter be enough for the usecase in this
> thread, without having to invent a new variable?
Hot standby differs from regular read-only transactions in a number of
ways. Most importantly, it prohibits LISTEN/NOTIFY. Grep for
PreventCommandDuringRecovery() if you're interested in the scope.
Elvis