Re: Inconsistency in reporting checkpointer stats - Mailing list pgsql-hackers

From Bharath Rupireddy
Subject Re: Inconsistency in reporting checkpointer stats
Date
Msg-id CALj2ACVubu7JAsJJeUi5irivMb+YvUDSrYvEyHfLHR_6P15z1Q@mail.gmail.com
Whole thread Raw
In response to Re: Inconsistency in reporting checkpointer stats  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Responses Re: Inconsistency in reporting checkpointer stats  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
List pgsql-hackers
On Fri, Dec 16, 2022 at 2:14 PM Kyotaro Horiguchi
<horikyota.ntt@gmail.com> wrote:
>
> In the first place I don't like that we count the same things twice.
> Couldn't we count the number only by any one of them?
>
> If we remove CheckPointerStats.ckpt_bufs_written, CreateCheckPoint can
> get the final number as the difference between the start-end values of
> *the shared stats*. As long as a checkpoint runs on a single process,
> trace info in BufferSync will work fine.  Assuming single process
> checkpointing there must be no problem to do that. (Anyway the current
> shared stats update for checkpointer is assuming single-process).

What if someone resets checkpointer shared stats with
pg_stat_reset_shared()? In such a case, the checkpoint complete
message will not have the stats, no?

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



pgsql-hackers by date:

Previous
From: Bharath Rupireddy
Date:
Subject: Re: Add LSN along with offset to error messages reported for WAL file read/write/validate header failures
Next
From: Ted Yu
Date:
Subject: Re: On login trigger: take three