Re: display hot standby state in psql prompt

From: Greg Sabino Mullane <htamfids(at)gmail(dot)com>
To: Jim Jones <jim(dot)jones(at)uni-muenster(dot)de>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: display hot standby state in psql prompt
Date: 2025-06-25 15:17:54
Message-ID: CAKAnmm+qDTsofqT6ShjjpKn3+WMNovttomwO0mTYcZgg7R7kDQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jun 25, 2025 at 4:02 AM Jim Jones <jim(dot)jones(at)uni-muenster(dot)de> wrote:

> if (pset.db && PQparameterStatus(pset.db, "in_hot_standby"))
>

Seems transaction_read_only might be a more useful thing to examine? That's
the side-effect, if you will, that people really care about when in hot
standby mode (and of course, we can get into TRO other ways).

Cheers,
Greg

--
Crunchy Data - https://www.crunchydata.com
Enterprise Postgres Software Products & Tech Support

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nathan Bossart 2025-06-25 15:21:03 Re: Fixes inconsistent behavior in vacuum when it processes multiple relations
Previous Message Fujii Masao 2025-06-25 15:04:28 Re: pg_dump misses comments on NOT NULL constraints