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

Commite927f55

Browse files
committed
If the stats collector dies during Hot Standby, restart it.
This bug exists as far back as 9.0, when Hot Standby was introduced,so back-patch to all supported branches.Report and patch by Takayuki Tsunakawa, reviewed by Michael Paquierand Kuntal Ghosh.
1 parent92929a3 commite927f55

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎src/backend/postmaster/postmaster.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1754,7 +1754,8 @@ ServerLoop(void)
17541754
PgArchPID=pgarch_start();
17551755

17561756
/* If we have lost the stats collector, try to start a new one */
1757-
if (PgStatPID==0&&pmState==PM_RUN)
1757+
if (PgStatPID==0&&
1758+
(pmState==PM_RUN||pmState==PM_HOT_STANDBY))
17581759
PgStatPID=pgstat_start();
17591760

17601761
/* If we need to signal the autovacuum launcher, do so now */
@@ -2902,7 +2903,7 @@ reaper(SIGNAL_ARGS)
29022903
if (!EXIT_STATUS_0(exitstatus))
29032904
LogChildExit(LOG,_("statistics collector process"),
29042905
pid,exitstatus);
2905-
if (pmState==PM_RUN)
2906+
if (pmState==PM_RUN||pmState==PM_HOT_STANDBY)
29062907
PgStatPID=pgstat_start();
29072908
continue;
29082909
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp