Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf740082

Browse files
committed
Clarify some comments around SharedRecoveryState in xlog.c
SharedRecoveryState has been switched from a boolean to an enum as ofcommit4e87c48, but some comments still referred to it as a boolean.Author: Amul SulReviewed-by: Dilip Kumar, Kyotaro HoriguchiDiscussion:https://postgr.es/m/CAAJ_b97Hf+1SXnm8jySpO+Fhm+-VKFAAce1T_cupUYtnE3Nxig
1 parent418611c commitf740082

File tree

1 file changed

+8
-9
lines changed
  • src/backend/access/transam

1 file changed

+8
-9
lines changed

‎src/backend/access/transam/xlog.c

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -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 backendsto 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 backendscan write
8002+
*WAL, isupdated while holding ControlFileLock to prevent other backends
8003+
*to lookat an inconsistent state of the control file in shared memory.
8004+
*Thereis still a small window during which backends can write WAL and
8005+
*thecontrol 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

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp