forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit3a11485
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 parenta9fbf55 commit3a11485
1 file changed
+25
-15
lines changedLines changed: 25 additions & 15 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
6676 | 6676 |
| |
6677 | 6677 |
| |
6678 | 6678 |
| |
6679 |
| - | |
| 6679 | + | |
| 6680 | + | |
| 6681 | + | |
6680 | 6682 |
| |
6681 |
| - | |
6682 | 6683 |
| |
6683 | 6684 |
| |
6684 | 6685 |
| |
| |||
6687 | 6688 |
| |
6688 | 6689 |
| |
6689 | 6690 |
| |
| 6691 | + | |
| 6692 | + | |
6690 | 6693 |
| |
6691 | 6694 |
| |
6692 | 6695 |
| |
| |||
6705 | 6708 |
| |
6706 | 6709 |
| |
6707 | 6710 |
| |
| 6711 | + | |
6708 | 6712 |
| |
6709 |
| - | |
6710 |
| - | |
6711 | 6713 |
| |
6712 | 6714 |
| |
6713 | 6715 |
| |
| |||
6730 | 6732 |
| |
6731 | 6733 |
| |
6732 | 6734 |
| |
6733 |
| - | |
6734 |
| - | |
6735 |
| - | |
| 6735 | + | |
| 6736 | + | |
| 6737 | + | |
6736 | 6738 |
| |
6737 | 6739 |
| |
6738 | 6740 |
| |
| |||
6746 | 6748 |
| |
6747 | 6749 |
| |
6748 | 6750 |
| |
6749 |
| - | |
6750 | 6751 |
| |
6751 | 6752 |
| |
6752 | 6753 |
| |
| |||
6768 | 6769 |
| |
6769 | 6770 |
| |
6770 | 6771 |
| |
6771 |
| - | |
6772 |
| - | |
6773 |
| - | |
6774 |
| - | |
6775 |
| - | |
6776 | 6772 |
| |
6777 | 6773 |
| |
6778 | 6774 |
| |
| |||
6800 | 6796 |
| |
6801 | 6797 |
| |
6802 | 6798 |
| |
6803 |
| - | |
| 6799 | + | |
6804 | 6800 |
| |
| 6801 | + | |
| 6802 | + | |
| 6803 | + | |
| 6804 | + | |
| 6805 | + | |
| 6806 | + | |
| 6807 | + | |
| 6808 | + | |
| 6809 | + | |
| 6810 | + | |
| 6811 | + | |
6805 | 6812 |
| |
6806 | 6813 |
| |
6807 | 6814 |
| |
| 6815 | + | |
| 6816 | + | |
6808 | 6817 |
| |
6809 | 6818 |
| |
6810 | 6819 |
| |
| |||
6857 | 6866 |
| |
6858 | 6867 |
| |
6859 | 6868 |
| |
6860 |
| - | |
| 6869 | + | |
| 6870 | + | |
6861 | 6871 |
| |
6862 | 6872 |
| |
6863 | 6873 |
| |
|
0 commit comments
Comments
(0)