Re: Introduce a new view for checkpointer related stats - Mailing list pgsql-hackers

From Drouvot, Bertrand
Subject Re: Introduce a new view for checkpointer related stats
Date
Msg-id 38c3af6c-0355-9746-cb78-943daf9ba27c@gmail.com
Whole thread Raw
In response to Re: Introduce a new view for checkpointer related stats  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Responses Re: Introduce a new view for checkpointer related stats  (Nathan Bossart <nathandbossart@gmail.com>)
Re: Introduce a new view for checkpointer related stats  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
List pgsql-hackers
Hi,

On 12/2/22 6:50 AM, Bharath Rupireddy wrote:
> On Wed, Nov 30, 2022 at 5:15 PM Bharath Rupireddy
> <bharath.rupireddyforpostgres@gmail.com> wrote:
>>
>> I don't have a strong opinion about changing column names. However, if
>> we were to change it, I prefer to use names that
>> PgStat_CheckpointerStats has. BTW, that's what
>> PgStat_BgWriterStats/pg_stat_bgwriter and
>> PgStat_ArchiverStats/pg_stat_archiver uses.
> 
> After thinking about this a while, I convinced myself to change the
> column names to be a bit more meaningful. I still think having
> checkpoints in the column names is needed because it also has other
> backend related columns. I'm attaching the v4 patch for further
> review.
> CREATE VIEW pg_stat_checkpointer AS
>      SELECT
>          pg_stat_get_timed_checkpoints() AS timed_checkpoints,
>          pg_stat_get_requested_checkpoints() AS requested_checkpoints,
>          pg_stat_get_checkpoint_write_time() AS checkpoint_write_time,
>          pg_stat_get_checkpoint_sync_time() AS checkpoint_sync_time,
>          pg_stat_get_buf_written_checkpoints() AS buffers_written_checkpoints,
>          pg_stat_get_buf_written_backend() AS buffers_written_backend,
>          pg_stat_get_buf_fsync_backend() AS buffers_fsync_backend,
>          pg_stat_get_checkpointer_stat_reset_time() AS stats_reset;
> 

Thanks!

Patch LGTM, marking it as Ready for Committer.

Regards,

-- 
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Improve performance of pg_strtointNN functions
Next
From: Peifeng Qiu
Date:
Subject: Optimize common expressions in projection evaluation