aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/transam/xlog.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/access/transam/xlog.c')
-rw-r--r--src/backend/access/transam/xlog.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index e4f9595ee5f..93f3ca2b2b7 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -4841,6 +4841,11 @@ XLOGShmemInit(void)
{
/* both should be present or neither */
Assert(foundCFile && foundXLog);
+
+ /* Initialize local copy of WALInsertLocks and register the tranche */
+ WALInsertLocks = XLogCtl->Insert.WALInsertLocks;
+ LWLockRegisterTranche(XLogCtl->Insert.WALInsertLockTrancheId,
+ &XLogCtl->Insert.WALInsertLockTranche);
return;
}
memset(XLogCtl, 0, sizeof(XLogCtlData));
@@ -7619,11 +7624,6 @@ InitXLOGAccess(void)
ThisTimeLineID = XLogCtl->ThisTimeLineID;
Assert(ThisTimeLineID != 0 || IsBootstrapProcessingMode());
- /* Initialize our copy of WALInsertLocks and register the tranche */
- WALInsertLocks = XLogCtl->Insert.WALInsertLocks;
- LWLockRegisterTranche(XLogCtl->Insert.WALInsertLockTrancheId,
- &XLogCtl->Insert.WALInsertLockTranche);
-
/* Use GetRedoRecPtr to copy the RedoRecPtr safely */
(void) GetRedoRecPtr();
}