On 27/01/2026 04:46, Fujii Masao wrote:
> Yeah, I'm fine with switching back to the original proposal.
PFA v8 containing the original proposal.
It now only checks in_hot_standby to determine if the current state of
the connected server is "primary" or "standby".
psql (19devel)
Type "help" for help.
postgres=# \set PROMPT1 '[%i] # '
[standby] # SHOW in_hot_standby;
in_hot_standby
----------------
on
(1 row)
[standby] # SELECT pg_promote();
pg_promote
------------
t
(1 row)
[primary] # SHOW in_hot_standby;
in_hot_standby
----------------
off
(1 row)
[primary] #
The documentation was updated accordingly.
Thanks!
Best, Jim