Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bugs in GetSafeSnapshotBlockingPids(), introduced in 9600371
While removing the use of SHM_QUEUE from predicate.c, in 9600371, I made two mistakes in GetSafeSnapshotBlockingPids(): - Removed the check for output_size - Previously, when the first loop didn't find a matching proc, sxact would be NULL. But with naive use of dlist_foreach() it ends up as the value of the last iteration. The second issue is the cause of occasional failures in the deadlock-hard and deadlock-soft isolation tests that we have been observing on CI. The issue was very hard to reproduce, as it requires the transactions.sql regression test to run at the same time as the deadlock-{hard,soft} isolation test. I did not find other similar mistakes in 9600371. Discussion: https://postgr.es/m/[email protected]
- Loading branch information