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

Commitd265cd2

Browse files
committed
Use SetInstallXLogFileSegmentActive() in more places in xlog.c
This reduces the code paths where XLogCtl->InstallXLogFileSegmentActiveis directly touched, and this wrapper function does the same thing asthe original code replaced by the function call.Author: Bharath RupireddyReviewed-by: Nathan BossartDiscussion:https://postgr.es/m/CALj2ACVhkf-bC5CX-=6iBUfkO5GqmBntQH+m=HpY0iQ=-g1pRg@mail.gmail.com
1 parent93f2349 commitd265cd2

File tree

1 file changed

+2
-6
lines changed
  • src/backend/access/transam

1 file changed

+2
-6
lines changed

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

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4501,9 +4501,7 @@ BootStrapXLOG(void)
45014501
pg_crc32ccrc;
45024502

45034503
/* allow ordinary WAL segment creation, like StartupXLOG() would */
4504-
LWLockAcquire(ControlFileLock,LW_EXCLUSIVE);
4505-
XLogCtl->InstallXLogFileSegmentActive= true;
4506-
LWLockRelease(ControlFileLock);
4504+
SetInstallXLogFileSegmentActive();
45074505

45084506
/*
45094507
* Select a hopefully-unique system identifier code for this installation.
@@ -5368,9 +5366,7 @@ StartupXLOG(void)
53685366
* Allow ordinary WAL segment creation before possibly switching to a new
53695367
* timeline, which creates a new segment, and after the last ReadRecord().
53705368
*/
5371-
LWLockAcquire(ControlFileLock,LW_EXCLUSIVE);
5372-
XLogCtl->InstallXLogFileSegmentActive= true;
5373-
LWLockRelease(ControlFileLock);
5369+
SetInstallXLogFileSegmentActive();
53745370

53755371
/*
53765372
* Consider whether we need to assign a new timeline ID.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp