Content-Length: 277632 | pFad | http://github.com/postgrespro/postgres_cluster/commit/4a43a6244d93dd0e16a898ff18d8641512b6006c

F2 If the stats collector dies during Hot Standby, restart it. · postgrespro/postgres_cluster@4a43a62 · GitHub
Skip to content

Commit 4a43a62

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 Paquier and Kuntal Ghosh.
1 parent 05e2293 commit 4a43a62

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)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres_cluster/commit/4a43a6244d93dd0e16a898ff18d8641512b6006c

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy