From 3ba182056faac66012aad8dedf2cb50ba511d989 Mon Sep 17 00:00:00 2001
From: Simon Riggs <simon@2ndQuadrant.com>
Date: Tue, 1 Nov 2011 18:38:27 +0000
Subject: [PATCH] Have checkpointer send stats once each processing loop.

Noted by Fujii Masao
---
 src/backend/postmaster/checkpointer.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/backend/postmaster/checkpointer.c b/src/backend/postmaster/checkpointer.c
index 2e36a0f2f33..e9ae1e8ca0b 100644
--- a/src/backend/postmaster/checkpointer.c
+++ b/src/backend/postmaster/checkpointer.c
@@ -527,6 +527,11 @@ CheckpointerMain(void)
 			ckpt_active = false;
 		}
 
+		/*
+		 * Send off activity statistics to the stats collector
+		 */
+		pgstat_send_bgwriter();
+
 		/*
 		 * Nap for a while and then loop again. Later patches will replace
 		 * this with a latch loop. Keep it simple now for clarity.
-- 
GitLab