Commit 49c2c5f
committed
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/20230208221145.bwzhancellclrgia@awork3.anarazel.de1 parent 969509c commit 49c2c5f
1 file changed
+11
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1563 | 1563 | | |
1564 | 1564 | | |
1565 | 1565 | | |
1566 | | - | |
| 1566 | + | |
1567 | 1567 | | |
1568 | 1568 | | |
1569 | 1569 | | |
1570 | 1570 | | |
1571 | 1571 | | |
1572 | 1572 | | |
1573 | | - | |
| 1573 | + | |
| 1574 | + | |
1574 | 1575 | | |
1575 | 1576 | | |
| 1577 | + | |
| 1578 | + | |
1576 | 1579 | | |
| 1580 | + | |
1577 | 1581 | | |
1578 | 1582 | | |
1579 | 1583 | | |
1580 | | - | |
| 1584 | + | |
1581 | 1585 | | |
1582 | 1586 | | |
1583 | | - | |
| 1587 | + | |
1584 | 1588 | | |
1585 | 1589 | | |
1586 | 1590 | | |
1587 | 1591 | | |
1588 | 1592 | | |
| 1593 | + | |
| 1594 | + | |
| 1595 | + | |
1589 | 1596 | | |
1590 | 1597 | | |
1591 | 1598 | | |
| |||
0 commit comments