- Notifications
You must be signed in to change notification settings - Fork5
Commitc931c07
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 toreclaim LP_DEAD line pointers later, so there is no need for a guardagainst the page being too full of line pointers, and having one risksrejecting pages that are perfectly good move destinations.This also exposed a second bug, which is that the empty_end_pages logicassumed that any page with no live tuples would get entered into thefraged_pages list automatically (by virtue of having more free space thanthe threshold in the do_frag calculation). This assumption certainlyseems risky when a low fillfactor has been chosen, and even withouttunable fillfactor I think it could conceivably fail on a page with manyunused line pointers. So fix the code to force do_frag true when notupis true, and patch this part of the fix all the way back.Per report from Tomas Szepe.1 parent082aca9 commitc931c07
1 file changed
+26
-7
lines changedLines changed: 26 additions & 7 deletions
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
Comments
(0)