Re: Is there a way (except from server logs) to know the kind of on-going/last checkpoint? - Mailing list pgsql-hackers

From Julien Rouhaud
Subject Re: Is there a way (except from server logs) to know the kind of on-going/last checkpoint?
Date
Msg-id 20220127105657.7osogdo6rfrfrt2v@jrouhaud
Whole thread Raw
In response to Re: Is there a way (except from server logs) to know the kind of on-going/last checkpoint?  (Sergey Dudoladov <sergey.dudoladov@gmail.com>)
Responses Re: Is there a way (except from server logs) to know the kind of on-going/last checkpoint?
List pgsql-hackers
Hi,

On Thu, Jan 27, 2022 at 10:53:32AM +0100, Sergey Dudoladov wrote:
> Hi all,
> 
> > Here's v2, rebased onto the latest master.
> 
> I've reviewed this patch. The patch builds against the master (commit
> e9d4001ec592bcc9a3332547cb1b0211e8794f38) and passes all the tests.
> The patch does what it intends to do, namely store the kind of the
> last checkpoint in the control file and display it in the output of
> the pg_control_checkpoint() function and pg_controldata utility.

I don't agree with that.

What it's showing is the "currently ongoing checkpoint or last completed
checkpoint" kind.  It's still not possible to know if a checkpoint is in
progress or not and any kind of information related to it, so I'm not sure how
useful this will be compared to a checkpoint progress view.

Also, it's only showing the initial triggering conditions of checkpoints.
For instance, if a timed checkpoint is started and then a backend executes a
"CHECKPOINT;", it will upgrade the ongoing checkpoint with additional flags but
AFAICS those new flags won't be saved to the control file.



pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Suppressing useless wakeups in walreceiver
Next
From: Julien Rouhaud
Date:
Subject: Re: Is there a way (except from server logs) to know the kind of on-going/last checkpoint?