summaryrefslogtreecommitdiff
path: root/src/include/access/heapam.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/heapam.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/heapam.h')
-rw-r--r--src/include/access/heapam.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/include/access/heapam.h b/src/include/access/heapam.h
index 459b7808245..f31a505ddae 100644
--- a/src/include/access/heapam.h
+++ b/src/include/access/heapam.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/access/heapam.h,v 1.143 2009/06/11 14:49:08 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/access/heapam.h,v 1.144 2009/08/24 02:18:32 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -128,7 +128,8 @@ extern void heap2_desc(StringInfo buf, uint8 xl_info, char *rec);
extern XLogRecPtr log_heap_move(Relation reln, Buffer oldbuf,
ItemPointerData from,
- Buffer newbuf, HeapTuple newtup);
+ Buffer newbuf, HeapTuple newtup,
+ bool all_visible_cleared, bool new_all_visible_cleared);
extern XLogRecPtr log_heap_clean(Relation reln, Buffer buffer,
OffsetNumber *redirected, int nredirected,
OffsetNumber *nowdead, int ndead,