Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions src/backend/access/transam/xact.c
Original file line number Diff line number Diff line change
Expand Up @@ -1442,16 +1442,6 @@ RecordTransactionCommit(void)
TransactionIdAsyncCommitTree(xid, nchildren, children, XactLastRecEnd);
}

/*
* If we entered a commit critical section, leave it now, and let
* checkpoints proceed.
*/
if (markXidCommitted)
{
MyProc->delayChkpt = false;
END_CRIT_SECTION();
}

/* Compute latestXid while we have the child XIDs handy */
latestXid = TransactionIdLatest(xid, nchildren, children);

Expand All @@ -1472,6 +1462,17 @@ RecordTransactionCommit(void)

/* Reset XactLastRecEnd until the next transaction writes something */
XactLastRecEnd = 0;

/*
* If we entered a commit critical section, leave it now, and let
* checkpoints proceed.
*/
if (markXidCommitted)
{
MyProc->delayChkpt = false;
END_CRIT_SECTION();
}

cleanup:
/* Clean up local data */
if (rels)
Expand Down