Skip to content

Commit 750f70b

Browse files
Update more comments about checkpoints being done by bgwriter
1 parent 18fb9d8 commit 750f70b

File tree

1 file changed

+10
-10
lines changed
  • src/backend/access/transam

1 file changed

+10
-10
lines changed

src/backend/access/transam/xlog.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -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-
* the bgwriter, this is just pro forma).
329+
* the checkpointer, 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 the bgwriter process can access it.
414+
* shared memory so that the checkpointer process can access it.
415415
*/
416416
char archiveCleanupCommand[MAXPGPATH];
417417

@@ -1837,7 +1837,7 @@ XLogWrite(XLogwrtRqst WriteRqst, bool flexible, bool xlog_switch)
18371837
Write->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 need the bgwriter
2027-
* to act this way too, and because when the bgwriter tries to write the
2026+
* test XLogInsertAllowed(), not InRecovery, because we need checkpointer
2027+
* to act this way too, and because when it tries to write the
20282028
* end-of-recovery checkpoint, it should indeed flush.
20292029
*/
20302030
if (!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 the bgwriter.
5859+
* that CreateRestartPoint is executed in the checkpointer.
58605860
*/
58615861
static void
58625862
SetLatestXTime(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 the bgwriter, not locally.
6474+
* subsequently to be handled by the checkpointer, not locally.
64756475
*/
64766476
if (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 the bgwriter, while this one will be executed by the startup
7973-
* process.)
7972+
* executed by the checkpointer, while this one will be executed by the
7973+
* startup process.)
79747974
*/
79757975
static void
79767976
RecoveryRestartPoint(const CheckPoint *checkPoint)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy