mirror of
https://github.com/postgres/postgres.git
synced 2025-06-29 10:41:53 +03:00
Move MarkCurrentTransactionIdLoggedIfAny() out of the critical section.
We don't modify any shared state in this function which could cause problems for any concurrent session. This will make it look similar to the other updates for the same structure (TransactionState) which avoids confusion for future readers of code. Author: Dilip Kumar Reviewed-by: Amit Kapila Discussion: https://postgr.es/m/E1mSoYz-0007Fh-D9@gemulon.postgresql.org
This commit is contained in:
@ -1169,10 +1169,10 @@ XLogInsertRecord(XLogRecData *rdata,
|
||||
*/
|
||||
WALInsertLockRelease();
|
||||
|
||||
MarkCurrentTransactionIdLoggedIfAny();
|
||||
|
||||
END_CRIT_SECTION();
|
||||
|
||||
MarkCurrentTransactionIdLoggedIfAny();
|
||||
|
||||
/*
|
||||
* Mark top transaction id is logged (if needed) so that we should not try
|
||||
* to log it again with the next WAL record in the current subtransaction.
|
||||
|
Reference in New Issue
Block a user