@@ -9743,6 +9743,8 @@ XLogReportParameters(void)
9743
9743
XLogFlush (recptr );
9744
9744
}
9745
9745
9746
+ LWLockAcquire (ControlFileLock , LW_EXCLUSIVE );
9747
+
9746
9748
ControlFile -> MaxConnections = MaxConnections ;
9747
9749
ControlFile -> max_worker_processes = max_worker_processes ;
9748
9750
ControlFile -> max_wal_senders = max_wal_senders ;
@@ -9752,6 +9754,8 @@ XLogReportParameters(void)
9752
9754
ControlFile -> wal_log_hints = wal_log_hints ;
9753
9755
ControlFile -> track_commit_timestamp = track_commit_timestamp ;
9754
9756
UpdateControlFile ();
9757
+
9758
+ LWLockRelease (ControlFileLock );
9755
9759
}
9756
9760
}
9757
9761
@@ -9976,7 +9980,9 @@ xlog_redo(XLogReaderState *record)
9976
9980
}
9977
9981
9978
9982
/* ControlFile->checkPointCopy always tracks the latest ckpt XID */
9983
+ LWLockAcquire (ControlFileLock , LW_EXCLUSIVE );
9979
9984
ControlFile -> checkPointCopy .nextFullXid = checkPoint .nextFullXid ;
9985
+ LWLockRelease (ControlFileLock );
9980
9986
9981
9987
/* Update shared-memory copy of checkpoint XID/epoch */
9982
9988
SpinLockAcquire (& XLogCtl -> info_lck );
@@ -10033,7 +10039,9 @@ xlog_redo(XLogReaderState *record)
10033
10039
SetTransactionIdLimit (checkPoint .oldestXid ,
10034
10040
checkPoint .oldestXidDB );
10035
10041
/* ControlFile->checkPointCopy always tracks the latest ckpt XID */
10042
+ LWLockAcquire (ControlFileLock , LW_EXCLUSIVE );
10036
10043
ControlFile -> checkPointCopy .nextFullXid = checkPoint .nextFullXid ;
10044
+ LWLockRelease (ControlFileLock );
10037
10045
10038
10046
/* Update shared-memory copy of checkpoint XID/epoch */
10039
10047
SpinLockAcquire (& XLogCtl -> info_lck );
0 commit comments