forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitd2599ec
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 parent966268c commitd2599ec
1 file changed
+25
-15
lines changedLines changed: 25 additions & 15 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
6803 | 6803 |
| |
6804 | 6804 |
| |
6805 | 6805 |
| |
6806 |
| - | |
| 6806 | + | |
| 6807 | + | |
| 6808 | + | |
6807 | 6809 |
| |
6808 |
| - | |
6809 | 6810 |
| |
6810 | 6811 |
| |
6811 | 6812 |
| |
| |||
6814 | 6815 |
| |
6815 | 6816 |
| |
6816 | 6817 |
| |
| 6818 | + | |
| 6819 | + | |
6817 | 6820 |
| |
6818 | 6821 |
| |
6819 | 6822 |
| |
| |||
6832 | 6835 |
| |
6833 | 6836 |
| |
6834 | 6837 |
| |
| 6838 | + | |
6835 | 6839 |
| |
6836 |
| - | |
6837 |
| - | |
6838 | 6840 |
| |
6839 | 6841 |
| |
6840 | 6842 |
| |
| |||
6857 | 6859 |
| |
6858 | 6860 |
| |
6859 | 6861 |
| |
6860 |
| - | |
6861 |
| - | |
6862 |
| - | |
| 6862 | + | |
| 6863 | + | |
| 6864 | + | |
6863 | 6865 |
| |
6864 | 6866 |
| |
6865 | 6867 |
| |
| |||
6873 | 6875 |
| |
6874 | 6876 |
| |
6875 | 6877 |
| |
6876 |
| - | |
6877 | 6878 |
| |
6878 | 6879 |
| |
6879 | 6880 |
| |
| |||
6895 | 6896 |
| |
6896 | 6897 |
| |
6897 | 6898 |
| |
6898 |
| - | |
6899 |
| - | |
6900 |
| - | |
6901 |
| - | |
6902 |
| - | |
6903 | 6899 |
| |
6904 | 6900 |
| |
6905 | 6901 |
| |
| |||
6927 | 6923 |
| |
6928 | 6924 |
| |
6929 | 6925 |
| |
6930 |
| - | |
| 6926 | + | |
6931 | 6927 |
| |
| 6928 | + | |
| 6929 | + | |
| 6930 | + | |
| 6931 | + | |
| 6932 | + | |
| 6933 | + | |
| 6934 | + | |
| 6935 | + | |
| 6936 | + | |
| 6937 | + | |
| 6938 | + | |
6932 | 6939 |
| |
6933 | 6940 |
| |
6934 | 6941 |
| |
| 6942 | + | |
| 6943 | + | |
6935 | 6944 |
| |
6936 | 6945 |
| |
6937 | 6946 |
| |
| |||
6984 | 6993 |
| |
6985 | 6994 |
| |
6986 | 6995 |
| |
6987 |
| - | |
| 6996 | + | |
| 6997 | + | |
6988 | 6998 |
| |
6989 | 6999 |
| |
6990 | 7000 |
| |
|
0 commit comments
Comments
(0)