From 1bc8e7b0991c1eae5fa6dc2d29bb2280efb52740 Mon Sep 17 00:00:00 2001 From: Andres Freund Date: Wed, 4 Aug 2021 19:16:04 -0700 Subject: pgstat: split reporting/fetching of bgwriter and checkpointer stats. These have been unrelated since bgwriter and checkpointer were split into two processes in 806a2aee379. As there several pending patches (shared memory stats, extending the set of tracked IO / buffer statistics) that are made a bit more awkward by the grouping, split them. Done separately to make reviewing easier. This does *not* change the contents of pg_stat_bgwriter or move fields out of bgwriter/checkpointer stats that arguably do not belong in either. However pgstat_fetch_global() was renamed and split into pgstat_fetch_stat_checkpointer() and pgstat_fetch_stat_bgwriter(). Author: Andres Freund Discussion: https://postgr.es/m/20210405092914.mmxqe7j56lsjfsej@alap3.anarazel.de --- src/backend/access/transam/xlog.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/backend/access/transam/xlog.c') diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 8b39a2fdaa5..d0ec6a834be 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -8721,8 +8721,8 @@ LogCheckpointEnd(bool restartpoint) CheckpointStats.ckpt_sync_end_t); /* Accumulate checkpoint timing summary data, in milliseconds. */ - BgWriterStats.m_checkpoint_write_time += write_msecs; - BgWriterStats.m_checkpoint_sync_time += sync_msecs; + PendingCheckpointerStats.m_checkpoint_write_time += write_msecs; + PendingCheckpointerStats.m_checkpoint_sync_time += sync_msecs; /* * All of the published timing statistics are accounted for. Only -- cgit v1.2.3