diff options
author | Michael Paquier | 2023-10-30 00:47:16 +0000 |
---|---|---|
committer | Michael Paquier | 2023-10-30 00:47:16 +0000 |
commit | 96f052613f35d07d001c8dd2f284ca8d95f82d1b (patch) | |
tree | 5a685b8ab234dda0862c915fd4526f39f09c9d39 /src/include/pgstat.h | |
parent | bf01e1ba963aed17449c70fed03c4ae74cce3926 (diff) |
Introduce pg_stat_checkpointer
Historically, the statistics of the checkpointer have been always part
of pg_stat_bgwriter. This commit removes a few columns from
pg_stat_bgwriter, and introduces pg_stat_checkpointer with equivalent,
renamed columns (plus a new one for the reset timestamp):
- checkpoints_timed -> num_timed
- checkpoints_req -> num_requested
- checkpoint_write_time -> write_time
- checkpoint_sync_time -> sync_time
- buffers_checkpoint -> buffers_written
The fields of PgStat_CheckpointerStats and its SQL functions are renamed
to match with the new field names, for consistency. Note that
background writer and checkpointer have been split into two different
processes in commits 806a2aee3791 and bf405ba8e460. The pgstat
structures were already split, making this change straight-forward.
Bump catalog version.
Author: Bharath Rupireddy
Reviewed-by: Bertrand Drouvot, Andres Freund, Michael Paquier
Discussion: https://postgr.es/m/CALj2ACVxX2ii=66RypXRweZe2EsBRiPMj0aHfRfHUeXJcC7kHg@mail.gmail.com
Diffstat (limited to 'src/include/pgstat.h')
-rw-r--r-- | src/include/pgstat.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/include/pgstat.h b/src/include/pgstat.h index e6fd20f1ce2..f95d8db0c4c 100644 --- a/src/include/pgstat.h +++ b/src/include/pgstat.h @@ -260,11 +260,12 @@ typedef struct PgStat_BgWriterStats typedef struct PgStat_CheckpointerStats { - PgStat_Counter timed_checkpoints; - PgStat_Counter requested_checkpoints; - PgStat_Counter checkpoint_write_time; /* times in milliseconds */ - PgStat_Counter checkpoint_sync_time; - PgStat_Counter buf_written_checkpoints; + PgStat_Counter num_timed; + PgStat_Counter num_requested; + PgStat_Counter write_time; /* times in milliseconds */ + PgStat_Counter sync_time; + PgStat_Counter buffers_written; + TimestampTz stat_reset_timestamp; } PgStat_CheckpointerStats; |