aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/backend/postmaster/checkpointer.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/backend/postmaster/checkpointer.c b/src/backend/postmaster/checkpointer.c
index 57c4d5a5d94..5907a7befc5 100644
--- a/src/backend/postmaster/checkpointer.c
+++ b/src/backend/postmaster/checkpointer.c
@@ -572,8 +572,19 @@ HandleCheckpointerInterrupts(void)
* back to the sigsetjmp block above
*/
ExitOnAnyError = true;
- /* Close down the database */
+
+ /*
+ * Close down the database.
+ *
+ * Since ShutdownXLOG() creates restartpoint or checkpoint, and
+ * updates the statistics, increment the checkpoint request and send
+ * the statistics to the stats collector.
+ */
+ BgWriterStats.m_requested_checkpoints++;
ShutdownXLOG(0, 0);
+ pgstat_send_bgwriter();
+ pgstat_report_wal();
+
/* Normal exit from the checkpointer is here */
proc_exit(0); /* done */
}