Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb82640d

Browse files
committed
Send statistics collected during shutdown checkpoint to the stats collector.
When shutdown is requested, checkpointer performs checkpoint orrestartpoint, and updates the statistics, before it exits. But previouslycheckpointer didn't send those statistics to the stats collector.Shutdown checkpoint and restartpoint are treated as requested onesinstead of scheduled ones, so the number of them are counted inpg_stat_bgwriter.checkpoints_req column.Author: Masahiro IkedaReviewed-by: Fujii MasaoDiscussion:https://postgr.es/m/0509ad67b585a5b86a83d445dfa75392@oss.nttdata.com
1 parent33394ee commitb82640d

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

‎src/backend/postmaster/checkpointer.c

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,8 +572,19 @@ HandleCheckpointerInterrupts(void)
572572
* back to the sigsetjmp block above
573573
*/
574574
ExitOnAnyError= true;
575-
/* Close down the database */
575+
576+
/*
577+
* Close down the database.
578+
*
579+
* Since ShutdownXLOG() creates restartpoint or checkpoint, and
580+
* updates the statistics, increment the checkpoint request and send
581+
* the statistics to the stats collector.
582+
*/
583+
BgWriterStats.m_requested_checkpoints++;
576584
ShutdownXLOG(0,0);
585+
pgstat_send_bgwriter();
586+
pgstat_report_wal();
587+
577588
/* Normal exit from the checkpointer is here */
578589
proc_exit(0);/* done */
579590
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp