forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commite1d6347
committed
Don't mark pages all-visible spuriously
Dan Wood diagnosed a long-standing problem that pages containing tuplesthat are locked by multixacts containing live lockers may spuriously endup as candidates for getting their all-visible flag set. This has thelong-term effect that multixacts remain unfrozen; this may previouslypass undetected, but since commit XYZ it would be reported as "ERROR: found multixact 134100944 from before relminmxid 192042633"because when a later vacuum tries to freeze the page it detects that amultixact that should have gotten frozen, wasn't.Dan proposed a (correct) patch that simply sets a variable to itscorrect value, after a bogus initialization. But, per discussion, itseems better coding to avoid the bogus initializations altogether, sincethey could give rise to more bugs later. Therefore this fix rewritesthe logic a little bit to avoid depending on the bogus initializations.This bug was part of a family introduced in 9.6 by commita892234;later, commit38e9f90 fixed most of them, but this one wasunnoticed.Authors: Dan Wood, Pavan Deolasee, Álvaro HerreraReviewed-by: Masahiko Sawada, Pavan Deolasee, Álvaro HerreraDiscussion:https://postgr.es/m/84EBAC55-F06D-4FBE-A3F3-8BDA093CE3E3@amazon.com1 parent56a4564 commite1d6347
1 file changed
+25
-15
lines changedLines changed: 25 additions & 15 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
6650 | 6650 |
| |
6651 | 6651 |
| |
6652 | 6652 |
| |
6653 |
| - | |
| 6653 | + | |
| 6654 | + | |
| 6655 | + | |
6654 | 6656 |
| |
6655 |
| - | |
6656 | 6657 |
| |
6657 | 6658 |
| |
6658 | 6659 |
| |
| |||
6661 | 6662 |
| |
6662 | 6663 |
| |
6663 | 6664 |
| |
| 6665 | + | |
| 6666 | + | |
6664 | 6667 |
| |
6665 | 6668 |
| |
6666 | 6669 |
| |
| |||
6679 | 6682 |
| |
6680 | 6683 |
| |
6681 | 6684 |
| |
| 6685 | + | |
6682 | 6686 |
| |
6683 |
| - | |
6684 |
| - | |
6685 | 6687 |
| |
6686 | 6688 |
| |
6687 | 6689 |
| |
| |||
6704 | 6706 |
| |
6705 | 6707 |
| |
6706 | 6708 |
| |
6707 |
| - | |
6708 |
| - | |
6709 |
| - | |
| 6709 | + | |
| 6710 | + | |
| 6711 | + | |
6710 | 6712 |
| |
6711 | 6713 |
| |
6712 | 6714 |
| |
| |||
6720 | 6722 |
| |
6721 | 6723 |
| |
6722 | 6724 |
| |
6723 |
| - | |
6724 | 6725 |
| |
6725 | 6726 |
| |
6726 | 6727 |
| |
| |||
6742 | 6743 |
| |
6743 | 6744 |
| |
6744 | 6745 |
| |
6745 |
| - | |
6746 |
| - | |
6747 |
| - | |
6748 |
| - | |
6749 |
| - | |
6750 | 6746 |
| |
6751 | 6747 |
| |
6752 | 6748 |
| |
| |||
6774 | 6770 |
| |
6775 | 6771 |
| |
6776 | 6772 |
| |
6777 |
| - | |
| 6773 | + | |
6778 | 6774 |
| |
| 6775 | + | |
| 6776 | + | |
| 6777 | + | |
| 6778 | + | |
| 6779 | + | |
| 6780 | + | |
| 6781 | + | |
| 6782 | + | |
| 6783 | + | |
| 6784 | + | |
| 6785 | + | |
6779 | 6786 |
| |
6780 | 6787 |
| |
6781 | 6788 |
| |
| 6789 | + | |
| 6790 | + | |
6782 | 6791 |
| |
6783 | 6792 |
| |
6784 | 6793 |
| |
| |||
6831 | 6840 |
| |
6832 | 6841 |
| |
6833 | 6842 |
| |
6834 |
| - | |
| 6843 | + | |
| 6844 | + | |
6835 | 6845 |
| |
6836 | 6846 |
| |
6837 | 6847 |
| |
|
0 commit comments
Comments
(0)