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

Commit4f714b2

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 parentf267c1c commit4f714b2

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
@@ -1753,7 +1753,8 @@ ServerLoop(void)
17531753
}
17541754

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

17591760
/* If we have lost the archiver, try to start a new one. */
@@ -2963,7 +2964,7 @@ reaper(SIGNAL_ARGS)
29632964
if (!EXIT_STATUS_0(exitstatus))
29642965
LogChildExit(LOG,_("statistics collector process"),
29652966
pid,exitstatus);
2966-
if (pmState==PM_RUN)
2967+
if (pmState==PM_RUN||pmState==PM_HOT_STANDBY)
29672968
PgStatPID=pgstat_start();
29682969
continue;
29692970
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp