Skip site navigation (1) Skip section navigation (2)

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:32
Message-ID: 20090824021832.5743E75331E@cvs.postgresql.org (view raw or flat)
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.

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)

Responses

pgsql-committers by date

Next:From: Tom LaneDate: 2009-08-24 02:18:40
Subject: pgsql: Fix a violation of WAL coding rules in the recent patch to
Previous:From: User FxjrDate: 2009-08-24 01:04:00
Subject: npgsql - Npgsql2: Last commit message should have been: Thanks Alaric

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group