Commit c931c07
committed
Repair VACUUM FULL bug introduced by HOT patch: the original way of
calculating a page's initial free space was fine, and should not have been
"improved" by letting PageGetHeapFreeSpace do it. VACUUM FULL is going to
reclaim LP_DEAD line pointers later, so there is no need for a guard
against the page being too full of line pointers, and having one risks
rejecting pages that are perfectly good move destinations.
This also exposed a second bug, which is that the empty_end_pages logic
assumed that any page with no live tuples would get entered into the
fraged_pages list automatically (by virtue of having more free space than
the threshold in the do_frag calculation). This assumption certainly
seems risky when a low fillfactor has been chosen, and even without
tunable fillfactor I think it could conceivably fail on a page with many
unused line pointers. So fix the code to force do_frag true when notup
is true, and patch this part of the fix all the way back.
Per report from Tomas Szepe.1 parent 082aca9 commit c931c07
1 file changed
+26
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
1659 | 1659 | | |
1660 | 1660 | | |
1661 | 1661 | | |
1662 | | - | |
1663 | | - | |
1664 | | - | |
1665 | | - | |
| 1662 | + | |
| 1663 | + | |
| 1664 | + | |
| 1665 | + | |
| 1666 | + | |
| 1667 | + | |
| 1668 | + | |
| 1669 | + | |
| 1670 | + | |
1666 | 1671 | | |
1667 | | - | |
| 1672 | + | |
| 1673 | + | |
1668 | 1674 | | |
1669 | 1675 | | |
1670 | 1676 | | |
| |||
1679 | 1685 | | |
1680 | 1686 | | |
1681 | 1687 | | |
| 1688 | + | |
1682 | 1689 | | |
1683 | 1690 | | |
1684 | 1691 | | |
| |||
3725 | 3732 | | |
3726 | 3733 | | |
3727 | 3734 | | |
3728 | | - | |
| 3735 | + | |
| 3736 | + | |
| 3737 | + | |
| 3738 | + | |
| 3739 | + | |
| 3740 | + | |
| 3741 | + | |
| 3742 | + | |
| 3743 | + | |
| 3744 | + | |
| 3745 | + | |
| 3746 | + | |
| 3747 | + | |
3729 | 3748 | | |
3730 | 3749 | | |
3731 | 3750 | | |
| |||
0 commit comments