summaryrefslogtreecommitdiff
path: root/src/include/access/visibilitymap.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2009-08-24 02:18:32 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2009-08-24 02:18:32 +0000
commit7fc7a7c4d082bfbd579f49e92b046dd51f1faf5f (patch)
treee19eb3522dff2a147be330e6388980e4ff2be803 /src/include/access/visibilitymap.h
parentcab9a0656c36739f59277b34fea8ab9438395869 (diff)
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.
Diffstat (limited to 'src/include/access/visibilitymap.h')
-rw-r--r--src/include/access/visibilitymap.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/include/access/visibilitymap.h b/src/include/access/visibilitymap.h
index 3f4b3abb3c5..325551944d5 100644
--- a/src/include/access/visibilitymap.h
+++ b/src/include/access/visibilitymap.h
@@ -7,17 +7,17 @@
* Portions Copyright (c) 2007-2009, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/access/visibilitymap.h,v 1.4 2009/06/11 14:49:09 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/access/visibilitymap.h,v 1.5 2009/08/24 02:18:32 tgl Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef VISIBILITYMAP_H
#define VISIBILITYMAP_H
-#include "utils/relcache.h"
-#include "storage/buf.h"
-#include "storage/itemptr.h"
#include "access/xlogdefs.h"
+#include "storage/block.h"
+#include "storage/buf.h"
+#include "utils/relcache.h"
extern void visibilitymap_clear(Relation rel, BlockNumber heapBlk);
extern void visibilitymap_pin(Relation rel, BlockNumber heapBlk,