@@ -326,7 +326,7 @@ static XLogRecPtr RedoStartLSN = {0, 0};
326326 *
327327 * CheckpointLock: must be held to do a checkpoint or restartpoint (ensures
328328 * only one checkpointer at a time; currently, with all checkpoints done by
329- * thebgwriter , this is just pro forma).
329+ * thecheckpointer , this is just pro forma).
330330 *
331331 *----------
332332 */
@@ -411,7 +411,7 @@ typedef struct XLogCtlData
411411
412412/*
413413 * archiveCleanupCommand is read from recovery.conf but needs to be in
414- * shared memory so that thebgwriter process can access it.
414+ * shared memory so that thecheckpointer process can access it.
415415 */
416416char archiveCleanupCommand [MAXPGPATH ];
417417
@@ -1837,7 +1837,7 @@ XLogWrite(XLogwrtRqst WriteRqst, bool flexible, bool xlog_switch)
18371837Write -> lastSegSwitchTime = (pg_time_t )time (NULL );
18381838
18391839/*
1840- *Signal bgwriter to start a checkpoint if we've consumed too
1840+ *Request a checkpoint if we've consumed too
18411841 * much xlog since the last one. For speed, we first check
18421842 * using the local copy of RedoRecPtr, which might be out of
18431843 * date; if it looks like a checkpoint is needed, forcibly
@@ -2023,8 +2023,8 @@ XLogFlush(XLogRecPtr record)
20232023/*
20242024 * During REDO, we are reading not writing WAL. Therefore, instead of
20252025 * trying to flush the WAL, we should update minRecoveryPoint instead. We
2026- * test XLogInsertAllowed(), not InRecovery, because we needthe bgwriter
2027- * to act this way too, and because whenthe bgwriter tries to write the
2026+ * test XLogInsertAllowed(), not InRecovery, because we needcheckpointer
2027+ * to act this way too, and because whenit tries to write the
20282028 * end-of-recovery checkpoint, it should indeed flush.
20292029 */
20302030if (!XLogInsertAllowed ())
@@ -5856,7 +5856,7 @@ pg_is_xlog_replay_paused(PG_FUNCTION_ARGS)
58565856 *
58575857 * We keep this in XLogCtl, not a simple static variable, so that it can be
58585858 * seen by processes other than the startup process. Note in particular
5859- * that CreateRestartPoint is executed in thebgwriter .
5859+ * that CreateRestartPoint is executed in thecheckpointer .
58605860 */
58615861static void
58625862SetLatestXTime (TimestampTz xtime )
@@ -6464,14 +6464,14 @@ StartupXLOG(void)
64646464
64656465/*
64666466 * Let postmaster know we've started redo now, so that it can launch
6467- *bgwriter to perform restartpoints. We don't bother during crash
6467+ *checkpointer to perform restartpoints. We don't bother during crash
64686468 * recovery as restartpoints can only be performed during archive
64696469 * recovery. And we'd like to keep crash recovery simple, to avoid
64706470 * introducing bugs that could affect you when recovering after crash.
64716471 *
64726472 * After this point, we can no longer assume that we're the only
64736473 * process in addition to postmaster! Also, fsync requests are
6474- * subsequently to be handled by thebgwriter , not locally.
6474+ * subsequently to be handled by thecheckpointer , not locally.
64756475 */
64766476if (InArchiveRecovery && IsUnderPostmaster )
64776477{
@@ -7969,8 +7969,8 @@ CheckPointGuts(XLogRecPtr checkPointRedo, int flags)
79697969 * It must determine whether the checkpoint represents a safe restartpoint or
79707970 * not. If so, the checkpoint record is stashed in shared memory so that
79717971 * CreateRestartPoint can consult it. (Note that the latter function is
7972- * executed by thebgwriter , while this one will be executed by the startup
7973- * process.)
7972+ * executed by thecheckpointer , while this one will be executed by the
7973+ *startup process.)
79747974 */
79757975static void
79767976RecoveryRestartPoint (const CheckPoint * checkPoint )