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

Commitd9fad10

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 parent68f7fe1 commitd9fad10

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
@@ -4609,9 +4609,11 @@ xact_redo_commit_internal(TransactionId xid, XLogRecPtr lsn,
46094609
/*
46104610
* Release locks, if any. We do this for both two phase and normal one
46114611
* phase transactions. In effect we are ignoring the prepare phase and
4612-
* just going straight to lock release.
4612+
* just going straight to lock release. At commit we release all locks
4613+
* via their top-level xid only, so no need to provide subxact list,
4614+
* which will save time when replaying commits.
46134615
*/
4614-
StandbyReleaseLockTree(xid,nsubxacts,sub_xids);
4616+
StandbyReleaseLockTree(xid,0,NULL);
46154617
}
46164618

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

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp