@@ -7998,17 +7998,16 @@ StartupXLOG(void)
79987998 * All done with end-of-recovery actions.
79997999 *
80008000 * Now allow backends to write WAL and update the control file status in
8001- * consequence. The boolean flag allowing backends to write WAL is
8002- * updated while holding ControlFileLock to prevent other backends to look
8003- * at an inconsistent state of the control file in shared memory. There
8004- * is still a small window during which backends can write WAL and the
8005- * control file is still referring to a system not in DB_IN_PRODUCTION
8001+ * consequence. SharedRecoveryState, that controls if backends can write
8002+ * WAL, is updated while holding ControlFileLock to prevent other backends
8003+ * to look at an inconsistent state of the control file in shared memory.
8004+ * There is still a small window during which backends can write WAL and
8005+ * the control file is still referring to a system not in DB_IN_PRODUCTION
80068006 * state while looking at the on-disk control file.
80078007 *
8008- * Also, although the boolean flag to allow WAL is probably atomic in
8009- * itself, we use the info_lck here to ensure that there are no race
8010- * conditions concerning visibility of other recent updates to shared
8011- * memory.
8008+ * Also, we use info_lck to update SharedRecoveryState to ensure that
8009+ * there are no race conditions concerning visibility of other recent
8010+ * updates to shared memory.
80128011 */
80138012 LWLockAcquire (ControlFileLock , LW_EXCLUSIVE );
80148013 ControlFile -> state = DB_IN_PRODUCTION ;
0 commit comments