On Mon, Oct 27, 2025 at 09:08:17AM +0100, Jim Jones wrote:
> + Displays the session's read-only status as <literal>read-only</literal>
> + if the server is in hot standby (<literal>in_hot_standby</literal> is
> + <literal>on</literal>) or the default transaction mode is read-only
> + (<literal>default_transaction_read_only</literal> is <literal>on</literal>),
> + or <literal>read-write</literal> otherwise. Useful for identifying
> + sessions that cannot perform writes, such as in replication setups.
This was briefly mentioned upthread, but I'm a little concerned that this
doesn't respond to commands like SET TRANSACTION READ ONLY. I wonder if we
should mark transaction_read_only as GUC_REPORT and use that instead. FWIW
I see that we marked search_path as GUC_REPORT somewhat recently (see
commit 28a1121).
--
nathan