File tree 1 file changed +3
-7
lines changed
1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -1121,6 +1121,9 @@ StandbyReleaseAllLocks(void)
1121
1121
* StandbyReleaseOldLocks
1122
1122
* Release standby locks held by top-level XIDs that aren't running,
1123
1123
* as long as they're not prepared transactions.
1124
+ *
1125
+ * This is needed to prune the locks of crashed transactions, which didn't
1126
+ * write an ABORT/COMMIT record.
1124
1127
*/
1125
1128
void
1126
1129
StandbyReleaseOldLocks (TransactionId oldxid )
@@ -1266,13 +1269,6 @@ standby_redo(XLogReaderState *record)
1266
1269
* transactions already committed, since those commits raced ahead when
1267
1270
* making WAL entries.
1268
1271
*
1269
- * The loose timing also means that locks may be recorded that have a
1270
- * zero xid, since xids are removed from procs before locks are removed.
1271
- * So we must prune the lock list down to ensure we hold locks only for
1272
- * currently running xids, performed by StandbyReleaseOldLocks().
1273
- * Zero xids should no longer be possible, but we may be replaying WAL
1274
- * from a time when they were possible.
1275
- *
1276
1272
* For logical decoding only the running xacts information is needed;
1277
1273
* there's no need to look at the locking information, but it's logged anyway,
1278
1274
* as there's no independent knob to just enable logical decoding. For
You can’t perform that action at this time.
0 commit comments