Re: display hot standby state in psql prompt

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Nathan Bossart <nathandbossart(at)gmail(dot)com>
Cc: Jim Jones <jim(dot)jones(at)uni-muenster(dot)de>, Srinath Reddy Sadipiralla <srinath2133(at)gmail(dot)com>, Greg Sabino Mullane <htamfids(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: display hot standby state in psql prompt
Date: 2025-10-27 23:55:43
Message-ID: CAHGQGwERmS5gprymr6mEhVLZRuaNuig9N3jXvOsct-kMf5Ky3A@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Oct 28, 2025 at 6:00 AM Nathan Bossart <nathandbossart(at)gmail(dot)com> wrote:
>
> 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?

If we mark transaction_read_only as GUC_REPORT, wouldn't the reset value
be sent automatically at the end of the transaction? It seems like we wouldn't
need any new mechanism for that. However, the downside might be that
more ParameterStatus messages would be sent, potentially adding overhead.

Regards,

--
Fujii Masao

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Chao Li 2025-10-28 00:36:33 Re: [PATCH] pg_bsd_indent: improve formatting of multiline comments
Previous Message Michael Paquier 2025-10-27 23:35:15 Re: [PATCH] pg_bsd_indent: improve formatting of multiline comments