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

Commitf3d23d8

Browse files
committed
Initialize SLRU stats entries to zero.
Previously since SLRUStats was not initialized, SLRU stats counterscould begin with non-zero value. Which could lead to incorrect resultsin pg_stat_slru view.Author: Fujii MasaoReviewed-by: Tomas VondraDiscussion:https://postgr.es/m/976bbb73-a112-de3c-c488-b34b64609793@oss.nttdata.com
1 parentac3a486 commitf3d23d8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

‎src/backend/postmaster/pgstat.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2900,6 +2900,9 @@ pgstat_initialize(void)
29002900
MyBEEntry=&BackendStatusArray[MaxBackends+MyAuxProcType];
29012901
}
29022902

2903+
/* Initialize SLRU statistics to zero */
2904+
memset(&SLRUStats,0,sizeof(SLRUStats));
2905+
29032906
/* Set up a process-exit hook to clean up */
29042907
on_shmem_exit(pgstat_beshutdown_hook,0);
29052908
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp