diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c index c24df3f38c..10386dadce 100644 --- a/src/backend/access/transam/xact.c +++ b/src/backend/access/transam/xact.c @@ -4609,9 +4609,11 @@ xact_redo_commit_internal(TransactionId xid, XLogRecPtr lsn, /* * Release locks, if any. We do this for both two phase and normal one * phase transactions. In effect we are ignoring the prepare phase and - * just going straight to lock release. + * just going straight to lock release. At commit we release all locks + * via their top-level xid only, so no need to provide subxact list, + * which will save time when replaying commits. */ - StandbyReleaseLockTree(xid, nsubxacts, sub_xids); + StandbyReleaseLockTree(xid, 0, NULL); } /* Make sure files supposed to be dropped are dropped */