public inbox for [email protected]  
help / color / mirror / Atom feed
From: 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 16:00:01 -0500
Message-ID: <aP_dUTvY6a34RqJH@nathan> (raw)
In-Reply-To: <[email protected]>
References: <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]>
	<aP-ccJv1iyOmrieo@nathan>
	<[email protected]>

On Mon, Oct 27, 2025 at 09:17:03PM +0100, Jim Jones wrote:
> On 27/10/2025 17:23, Nathan Bossart wrote:
>> 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).
> 
> You're right, it doesn't. I like the idea, but I'm not sure how to
> integrate a transaction-scoped variable into this feature. Would that
> mean we also need to change the reset mechanism for GUC_REPORT variables
> when the transaction ends?

Hm.  You're right, that seems to have problems (I'm curious about the use
of stmt->is_local in SetPGVariable() for SET TRANSACTION statements).  I
also see some past discussions in this area [0] [1] [2].

[0] https://postgr.es/m/flat/3a40f835-116d-0f95-aede-d5236337bbf0%402ndquadrant.com
[1] https://postgr.es/m/flat/CA%2BTgmoZsHrHeqh5dYpoH%2BWW5EmT-egMGuyrLTsjKz80WajT4tg%40mail.gmail.com
[2] https://postgr.es/m/flat/CAFj8pRBFU-WzzQhNrwRHn67N0Ug8a9-0-9BOo69PPtcHiBDQMA%40mail.gmail.com

-- 
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_dUTvY6a34RqJH@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