Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3154177

Browse files
Skip searching for subxact locks at commit.
At commit all standby locks are releasedfor the top-level transaction, so searchingfor locks for each subtransaction is bothpointless and costly (N^2) in the presenceof many AccessExclusiveLocks.
1 parentf66e7ab commit3154177

File tree

1 file changed

+4
-2
lines changed
  • src/backend/access/transam

1 file changed

+4
-2
lines changed

‎src/backend/access/transam/xact.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4629,9 +4629,11 @@ xact_redo_commit_internal(TransactionId xid, XLogRecPtr lsn,
46294629
/*
46304630
* Release locks, if any. We do this for both two phase and normal one
46314631
* phase transactions. In effect we are ignoring the prepare phase and
4632-
* just going straight to lock release.
4632+
* just going straight to lock release. At commit we release all locks
4633+
* via their top-level xid only, so no need to provide subxact list,
4634+
* which will save time when replaying commits.
46334635
*/
4634-
StandbyReleaseLockTree(xid,nsubxacts,sub_xids);
4636+
StandbyReleaseLockTree(xid,0,NULL);
46354637
}
46364638

46374639
/* Make sure files supposed to be dropped are dropped */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp