pgsql: Fix a violation of WAL coding rules in the recent patch to - Mailing list pgsql-committers

From tgl@postgresql.org (Tom Lane)
Subject pgsql: Fix a violation of WAL coding rules in the recent patch to
Date
Msg-id 20090824021841.005F275331E@cvs.postgresql.org
Whole thread Raw
List 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)

pgsql-committers by date:

Previous
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Fix a violation of WAL coding rules in the recent patch to
Next
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Run the "tablespace" regression test first not last.