Revision bf0d21e6172ba049a51016215e31b5d198ca9abf authored by Heikki Linnakangas on 27 November 2013, 11:10:16 UTC, committed by Heikki Linnakangas on 27 November 2013, 11:44:10 UTC
Vacuum recognizes that it can update relfrozenxid by checking whether it has processed all pages of a relation. Unfortunately it performed that check after truncating the dead pages at the end of the relation, and used the new number of pages to decide whether all pages have been scanned. If the new number of pages happened to be smaller or equal to the number of pages scanned, it incorrectly decided that all pages were scanned. This can lead to relfrozenxid being updated, even though some pages were skipped that still contain old XIDs. That can lead to data loss due to xid wraparounds with some rows suddenly missing. This likely has escaped notice so far because it takes a large number (~2^31) of xids being used to see the effect, while a full-table vacuum before that would fix the issue. The incorrect logic was introduced by commit b4b6923e03f4d29636a94f6f4cc2f5cf6298b8c8. Backpatch this fix down to 8.4, like that commit. Andres Freund, with some modifications by me.
1 parent 9a1c6dd
File | Mode | Size |
---|---|---|
config | ||
contrib | ||
doc | ||
src | ||
.gitignore | -rw-r--r-- | 360 bytes |
COPYRIGHT | -rw-r--r-- | 1.2 KB |
GNUmakefile.in | -rw-r--r-- | 3.7 KB |
Makefile | -rw-r--r-- | 1.5 KB |
README | -rw-r--r-- | 1.3 KB |
README.git | -rw-r--r-- | 816 bytes |
aclocal.m4 | -rw-r--r-- | 385 bytes |
configure | -rwxr-xr-x | 850.2 KB |
configure.in | -rw-r--r-- | 62.7 KB |
Computing file changes ...