public inbox for [email protected]
help / color / mirror / Atom feedFrom: Nathan Bossart <[email protected]>
To: Jim Jones <[email protected]>
Cc: Fujii Masao <[email protected]>
Cc: Srinath Reddy Sadipiralla <[email protected]>
Cc: Greg Sabino Mullane <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: display hot standby state in psql prompt
Date: Mon, 27 Oct 2025 11:23:12 -0500
Message-ID: <aP-ccJv1iyOmrieo@nathan> (raw)
In-Reply-To: <[email protected]>
References: <CAKAnmmLf3Qpv54zM2u5N5XbbGDONtiz3F6yhM142O2mdQ3=f_A@mail.gmail.com>
<[email protected]>
<CAKAnmmJD=hCvFes5mrcn_PdmY5C8sioWxSoN_jzikZrrSeOMkw@mail.gmail.com>
<[email protected]>
<CAFC+b6oEYiW4Nh7vVWyYi5n6g1ac2=E71JP5NaoT2ARjzsTR6g@mail.gmail.com>
<[email protected]>
<CAHGQGwHnx96uspkmOsrpytew0A25wm4ozpe2=GzZpHoAph+t0g@mail.gmail.com>
<[email protected]>
<CAHGQGwHzNr71zQ7i73Jt55gnW0D-DYJtdoXHKEs0BgsjXAXw5Q@mail.gmail.com>
<[email protected]>
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
view thread (43+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: display hot standby state in psql prompt
In-Reply-To: <aP-ccJv1iyOmrieo@nathan>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox