Fix a violation of WAL coding rules in the recent patch to include an
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 24 Aug 2009 02:18:32 +0000 (02:18 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 24 Aug 2009 02:18:32 +0000 (02:18 +0000)
commit103f560d2a4115699657a8b332d0010f44c440e1
tree91e802d1c01bf662a3c2456c11661ec1e9692089
parentac3017349f2517dff44885fd26821a812a440c25
Fix a violation of WAL coding rules in the recent patch to include an
"all tuples visible" flag in heap page headers.  The flag update *must*
be applied before calling XLogInsert, but heap_update and the tuple
moving routines in VACUUM FULL were ignoring this rule.  A crash and
replay could therefore leave the flag incorrectly set, causing rows
to appear visible in seqscans when they should not be.  This might explain
recent reports of data corruption from Jeff Ross and others.

In passing, do a bit of editorialization on comments in visibilitymap.c.
src/backend/access/heap/heapam.c
src/backend/access/heap/visibilitymap.c
src/backend/commands/vacuum.c
src/backend/commands/vacuumlazy.c
src/include/access/heapam.h
src/include/access/visibilitymap.h