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 20090824021832.5743E75331E@cvs.postgresql.org
Whole thread Raw
Responses Re: pgsql: Fix a violation of WAL coding rules in the recent patch to
Re: pgsql: Fix a violation of WAL coding rules in the recent patch to
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.

Modified Files:
--------------
    pgsql/src/backend/access/heap:
        heapam.c (r1.277 -> r1.278)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/heap/heapam.c?r1=1.277&r2=1.278)
        visibilitymap.c (r1.5 -> r1.6)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/heap/visibilitymap.c?r1=1.5&r2=1.6)
    pgsql/src/backend/commands:
        vacuum.c (r1.389 -> r1.390)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/vacuum.c?r1=1.389&r2=1.390)
        vacuumlazy.c (r1.121 -> r1.122)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/vacuumlazy.c?r1=1.121&r2=1.122)
    pgsql/src/include/access:
        heapam.h (r1.143 -> r1.144)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/access/heapam.h?r1=1.143&r2=1.144)
        visibilitymap.h (r1.4 -> r1.5)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/access/visibilitymap.h?r1=1.4&r2=1.5)

pgsql-committers by date:

Previous
From: fxjr@pgfoundry.org (User Fxjr)
Date:
Subject: npgsql - Npgsql2: Last commit message should have been: Thanks Alaric
Next
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Fix a violation of WAL coding rules in the recent patch to