Skip to content

Commit a79ed10

Browse files
committed
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
1 parent 28a520c commit a79ed10

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

src/backend/postmaster/postmaster.c

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2386,9 +2386,9 @@ process_pm_child_exit(void)
23862386
connsAllowed = true;
23872387

23882388
/*
2389-
* Crank up the background tasks, if we didn't do that already
2390-
* when we entered consistent recovery state. It doesn't matter
2391-
* if this fails, we'll just try again later.
2389+
* Crank up any background tasks that we didn't start earlier
2390+
* already. It doesn't matter if any of these fail, we'll just
2391+
* try again later.
23922392
*/
23932393
if (CheckpointerPID == 0)
23942394
CheckpointerPID = StartChildProcess(B_CHECKPOINTER);
@@ -2397,18 +2397,11 @@ process_pm_child_exit(void)
23972397
if (WalWriterPID == 0)
23982398
WalWriterPID = StartChildProcess(B_WAL_WRITER);
23992399
MaybeStartWalSummarizer();
2400-
2401-
/*
2402-
* Likewise, start other special children as needed. In a restart
2403-
* situation, some of them may be alive already.
2404-
*/
24052400
if (!IsBinaryUpgrade && AutoVacuumingActive() && AutoVacPID == 0)
24062401
AutoVacPID = StartChildProcess(B_AUTOVAC_LAUNCHER);
24072402
if (PgArchStartupAllowed() && PgArchPID == 0)
24082403
PgArchPID = StartChildProcess(B_ARCHIVER);
24092404
MaybeStartSlotSyncWorker();
2410-
2411-
/* workers may be scheduled to start now */
24122405
maybe_start_bgworkers();
24132406

24142407
/* at this point we are really open for business */

0 commit comments

Comments
 (0)