mirror of
https://github.com/postgres/postgres.git
synced 2025-04-27 22:56:53 +03:00
Fix comment on processes being kept over a restart
All child processes except the syslogger are killed on a restart. The archiver might be already running though, if it was started during recovery. The split in the comments between "other special children" and the first group of "background tasks" seemed really arbitrary, so I just merged them all into one group. Reviewed-by: Thomas Munro <thomas.munro@gmail.com> Discussion: https://www.postgresql.org/message-id/8f2118b9-79e3-4af7-b2c9-bd5818193ca4@iki.fi
This commit is contained in:
parent
28a520c0b7
commit
a79ed10e6c
@ -2386,9 +2386,9 @@ process_pm_child_exit(void)
|
|||||||
connsAllowed = true;
|
connsAllowed = true;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Crank up the background tasks, if we didn't do that already
|
* Crank up any background tasks that we didn't start earlier
|
||||||
* when we entered consistent recovery state. It doesn't matter
|
* already. It doesn't matter if any of these fail, we'll just
|
||||||
* if this fails, we'll just try again later.
|
* try again later.
|
||||||
*/
|
*/
|
||||||
if (CheckpointerPID == 0)
|
if (CheckpointerPID == 0)
|
||||||
CheckpointerPID = StartChildProcess(B_CHECKPOINTER);
|
CheckpointerPID = StartChildProcess(B_CHECKPOINTER);
|
||||||
@ -2397,18 +2397,11 @@ process_pm_child_exit(void)
|
|||||||
if (WalWriterPID == 0)
|
if (WalWriterPID == 0)
|
||||||
WalWriterPID = StartChildProcess(B_WAL_WRITER);
|
WalWriterPID = StartChildProcess(B_WAL_WRITER);
|
||||||
MaybeStartWalSummarizer();
|
MaybeStartWalSummarizer();
|
||||||
|
|
||||||
/*
|
|
||||||
* Likewise, start other special children as needed. In a restart
|
|
||||||
* situation, some of them may be alive already.
|
|
||||||
*/
|
|
||||||
if (!IsBinaryUpgrade && AutoVacuumingActive() && AutoVacPID == 0)
|
if (!IsBinaryUpgrade && AutoVacuumingActive() && AutoVacPID == 0)
|
||||||
AutoVacPID = StartChildProcess(B_AUTOVAC_LAUNCHER);
|
AutoVacPID = StartChildProcess(B_AUTOVAC_LAUNCHER);
|
||||||
if (PgArchStartupAllowed() && PgArchPID == 0)
|
if (PgArchStartupAllowed() && PgArchPID == 0)
|
||||||
PgArchPID = StartChildProcess(B_ARCHIVER);
|
PgArchPID = StartChildProcess(B_ARCHIVER);
|
||||||
MaybeStartSlotSyncWorker();
|
MaybeStartSlotSyncWorker();
|
||||||
|
|
||||||
/* workers may be scheduled to start now */
|
|
||||||
maybe_start_bgworkers();
|
maybe_start_bgworkers();
|
||||||
|
|
||||||
/* at this point we are really open for business */
|
/* at this point we are really open for business */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user