diff options
| author | Michael Paquier | 2023-10-27 02:16:39 +0000 |
|---|---|---|
| committer | Michael Paquier | 2023-10-27 02:16:39 +0000 |
| commit | 74604a37f2f9eb6e626a4ff3cedd02aef5a2ad59 (patch) | |
| tree | 98c896ef510e28351b45e102e7c9970a0211c535 /src/backend/utils | |
| parent | 0c882a298881056176a27ccc44c5c3bb7c8f308c (diff) | |
Remove buffers_backend and buffers_backend_fsync from pg_stat_checkpointer
Two attributes related to checkpointer statistics are removed in this
commit:
- buffers_backend, that counts the number of buffers written directly by
a backend.
- buffers_backend_fsync, that counts the number of times a backend had
to do fsync() by its own.
These are actually not checkpointer properties but backend properties.
Also, pg_stat_io provides a more accurate and equivalent report of these
numbers, by tracking all the I/O stats related to backends, including
writes and fsyncs, so storing them in pg_stat_checkpointer was
redundant.
Thanks also to Robert Haas and Amit Kapila for their input.
Bump catalog version.
Author: Bharath Rupireddy
Reviewed-by: Bertrand Drouvot, Andres Freund
Discussion: https://postgr.es/m/20230210004604.mcszbscsqs3bc5nx@awork3.anarazel.de
Diffstat (limited to 'src/backend/utils')
| -rw-r--r-- | src/backend/utils/activity/pgstat_checkpointer.c | 4 | ||||
| -rw-r--r-- | src/backend/utils/adt/pgstatfuncs.c | 12 |
2 files changed, 0 insertions, 16 deletions
diff --git a/src/backend/utils/activity/pgstat_checkpointer.c b/src/backend/utils/activity/pgstat_checkpointer.c index 26dec112f6c..03ed5dddda7 100644 --- a/src/backend/utils/activity/pgstat_checkpointer.c +++ b/src/backend/utils/activity/pgstat_checkpointer.c @@ -52,8 +52,6 @@ pgstat_report_checkpointer(void) CHECKPOINTER_ACC(checkpoint_write_time); CHECKPOINTER_ACC(checkpoint_sync_time); CHECKPOINTER_ACC(buf_written_checkpoints); - CHECKPOINTER_ACC(buf_written_backend); - CHECKPOINTER_ACC(buf_fsync_backend); #undef CHECKPOINTER_ACC pgstat_end_changecount_write(&stats_shmem->changecount); @@ -120,7 +118,5 @@ pgstat_checkpointer_snapshot_cb(void) CHECKPOINTER_COMP(checkpoint_write_time); CHECKPOINTER_COMP(checkpoint_sync_time); CHECKPOINTER_COMP(buf_written_checkpoints); - CHECKPOINTER_COMP(buf_written_backend); - CHECKPOINTER_COMP(buf_fsync_backend); #undef CHECKPOINTER_COMP } diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c index 3b44af80066..6468b6a8057 100644 --- a/src/backend/utils/adt/pgstatfuncs.c +++ b/src/backend/utils/adt/pgstatfuncs.c @@ -1234,18 +1234,6 @@ pg_stat_get_bgwriter_stat_reset_time(PG_FUNCTION_ARGS) } Datum -pg_stat_get_buf_written_backend(PG_FUNCTION_ARGS) -{ - PG_RETURN_INT64(pgstat_fetch_stat_checkpointer()->buf_written_backend); -} - -Datum -pg_stat_get_buf_fsync_backend(PG_FUNCTION_ARGS) -{ - PG_RETURN_INT64(pgstat_fetch_stat_checkpointer()->buf_fsync_backend); -} - -Datum pg_stat_get_buf_alloc(PG_FUNCTION_ARGS) { PG_RETURN_INT64(pgstat_fetch_stat_bgwriter()->buf_alloc); |
