Re: Add DBState to pg_control_system function

From: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
To: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Add DBState to pg_control_system function
Date: 2022-02-21 18:01:23
Message-ID: a0f3f697-3277-e8de-2328-f8798faef248@oss.nttdata.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2022/02/01 13:22, Bharath Rupireddy wrote:
> Hi,
>
> I think emitting DBState (staring up, shut down, shut down in
> recovery, shutting down, in crash recovery, in archive recovery, in
> production) via the pg_control_system function would help know the
> database state, especially during PITR/archive recovery. During
> archive recovery, the server can open up for read-only connections
> even before the archive recovery finishes. Having, pg_control_system
> emit database state would help the users/service layers know it and so
> they can take some actions based on it.
>
> Attaching a patch herewith.
>
> Thoughts?

This information seems not so helpful because only "in production" and "archive recovery" can be reported during normal running and recovery, respectively. No? In the state other than them, we cannot connect to the server and execute pg_control_system().

Regards,

--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2022-02-21 18:05:37 Re: Time to drop plpython2?
Previous Message Mark Wong 2022-02-21 17:49:32 Re: Time to drop plpython2?