pgsql: Fix a violation of WAL coding rules in the recent patch to

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix a violation of WAL coding rules in the recent patch to
Date: 2009-08-24 02:18:40
Message-ID: 20090824021841.005F275331E@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
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.

Tags:
----
REL8_4_STABLE

Modified Files:
--------------
pgsql/src/backend/access/heap:
heapam.c (r1.277 -> r1.277.2.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/heap/heapam.c?r1=1.277&r2=1.277.2.1)
visibilitymap.c (r1.5 -> r1.5.2.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/heap/visibilitymap.c?r1=1.5&r2=1.5.2.1)
pgsql/src/backend/commands:
vacuum.c (r1.389 -> r1.389.2.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/vacuum.c?r1=1.389&r2=1.389.2.1)
vacuumlazy.c (r1.121 -> r1.121.2.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/vacuumlazy.c?r1=1.121&r2=1.121.2.1)
pgsql/src/include/access:
heapam.h (r1.143 -> r1.143.2.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/access/heapam.h?r1=1.143&r2=1.143.2.1)
visibilitymap.h (r1.4 -> r1.4.2.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/access/visibilitymap.h?r1=1.4&r2=1.4.2.1)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2009-08-24 03:10:16 pgsql: Run the "tablespace" regression test first not last.
Previous Message Tom Lane 2009-08-24 02:18:32 pgsql: Fix a violation of WAL coding rules in the recent patch to