@@ -7998,17 +7998,16 @@ StartupXLOG(void)
7998
7998
* All done with end-of-recovery actions.
7999
7999
*
8000
8000
* 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
8006
8006
* state while looking at the on-disk control file.
8007
8007
*
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.
8012
8011
*/
8013
8012
LWLockAcquire (ControlFileLock , LW_EXCLUSIVE );
8014
8013
ControlFile -> state = DB_IN_PRODUCTION ;
0 commit comments