Commit f65ab86
committed
Close race condition between datfrozen and relfrozen updates.
vac_update_datfrozenxid() did multiple loads of relfrozenxid and
relminmxid from buffer memory, and it assumed each would get the same
value. Not so if a concurrent vac_update_relstats() did an inplace
update. Commit 2d2e40e fixed the same
kind of bug in vac_truncate_clog(). Today's bug could cause the
rel-level field and XIDs in the rel's rows to precede the db-level
field. A cluster having such values should VACUUM affected tables.
Back-patch to v12 (all supported versions).
Discussion: https://postgr.es/m/20240423003956.e7.nmisch@google.com1 parent 17a834a commit f65ab86
1 file changed
+16
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1611 | 1611 | | |
1612 | 1612 | | |
1613 | 1613 | | |
| 1614 | + | |
| 1615 | + | |
1614 | 1616 | | |
1615 | 1617 | | |
1616 | 1618 | | |
| |||
1619 | 1621 | | |
1620 | 1622 | | |
1621 | 1623 | | |
1622 | | - | |
| 1624 | + | |
| 1625 | + | |
| 1626 | + | |
1623 | 1627 | | |
1624 | 1628 | | |
1625 | 1629 | | |
| |||
1629 | 1633 | | |
1630 | 1634 | | |
1631 | 1635 | | |
1632 | | - | |
1633 | | - | |
| 1636 | + | |
| 1637 | + | |
1634 | 1638 | | |
1635 | 1639 | | |
1636 | 1640 | | |
| |||
1649 | 1653 | | |
1650 | 1654 | | |
1651 | 1655 | | |
1652 | | - | |
| 1656 | + | |
1653 | 1657 | | |
1654 | | - | |
| 1658 | + | |
1655 | 1659 | | |
1656 | 1660 | | |
1657 | | - | |
| 1661 | + | |
1658 | 1662 | | |
1659 | 1663 | | |
1660 | 1664 | | |
1661 | 1665 | | |
1662 | 1666 | | |
1663 | 1667 | | |
1664 | | - | |
1665 | | - | |
| 1668 | + | |
| 1669 | + | |
1666 | 1670 | | |
1667 | 1671 | | |
1668 | | - | |
| 1672 | + | |
1669 | 1673 | | |
1670 | 1674 | | |
1671 | | - | |
| 1675 | + | |
1672 | 1676 | | |
1673 | 1677 | | |
1674 | 1678 | | |
1675 | 1679 | | |
1676 | 1680 | | |
1677 | 1681 | | |
1678 | | - | |
1679 | | - | |
| 1682 | + | |
| 1683 | + | |
1680 | 1684 | | |
1681 | 1685 | | |
1682 | 1686 | | |
| |||
0 commit comments