Move MarkCurrentTransactionIdLoggedIfAny() out of the critical section.

Amit Kapila <akapila@postgresql.org>

Commit: 335397456b7e3f9f619038cb322fbfc9dd649d4f
Author: Amit Kapila <akapila@postgresql.org>
Date: 2021-11-02T03:41:05Z
Releases: 15.0
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

Files

PathChange+/−
src/backend/access/transam/xlog.c modified +2 −2

Discussion