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

From Andres Freund
Subject Re: Is there a way (except from server logs) to know the kind of on-going/last checkpoint?
Date
Msg-id 20220128233721.44ges4amzmoelbw6@alap3.anarazel.de
Whole thread Raw
In response to Re: Is there a way (except from server logs) to know the kind of on-going/last checkpoint?  (Tomas Vondra <tomas.vondra@enterprisedb.com>)
List pgsql-hackers
Hi,

On 2021-12-08 03:04:23 +0100, Tomas Vondra wrote:
> On 12/8/21 02:54, Bharath Rupireddy wrote:
> >> I'm not sure about adding it to control data, though. That doesn't seem
> >> like a very good match for something that's mostly for monitoring.
> > 
> > Having it in the control data file (along with the existing checkpoint
> > information) will be helpful to know what was the last checkpoint
> > information and we can use the existing pg_control_checkpoint function
> > or the tool to emit that info. I plan to add an int16 flag as
> > suggested by Justin in this thread and come up with a patch.
> > 
> 
> OK, although I'm not sure it's all that useful (if we have that in some
> sort of system view).

I don't think we should add stuff like this to the control file. We want to
keep ControlFileData within a disk sector size / 512 bytes (so that we don't
need to care about torn writes etc). Adding information that we don't really
need will byte us at some point, because at that point there will be reliance
on the added data.

Nor have I read a convincing reason for needing the data to be readily
accessible when the server is shut down?

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Cary Huang
Date:
Subject: Re: warn if GUC set to an invalid shared library
Next
From: Andres Freund
Date:
Subject: Re: Is there a way (except from server logs) to know the kind of on-going/last checkpoint?