From defe93463c69f8e0bb717294a34d67c34ac0b03f Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Fri, 14 Apr 2006 20:27:24 +0000 Subject: Make the world safe for full_page_writes. Allow XLOG records that try to update no-longer-existing pages to fall through as no-ops, but make a note of each page number referenced by such records. If we don't see a later XLOG entry dropping the table or truncating away the page, complain at the end of XLOG replay. Since this fixes the known failure mode for full_page_writes = off, revert my previous band-aid patch that disabled that GUC variable. --- src/include/access/xlogutils.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/include/access/xlogutils.h') diff --git a/src/include/access/xlogutils.h b/src/include/access/xlogutils.h index a684656d03..6c2db1dc7b 100644 --- a/src/include/access/xlogutils.h +++ b/src/include/access/xlogutils.h @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/access/xlogutils.h,v 1.20 2006/03/29 21:17:39 tgl Exp $ + * $PostgreSQL: pgsql/src/include/access/xlogutils.h,v 1.21 2006/04/14 20:27:24 tgl Exp $ */ #ifndef XLOG_UTILS_H #define XLOG_UTILS_H @@ -16,11 +16,13 @@ extern void XLogInitRelationCache(void); +extern void XLogCheckInvalidPages(void); extern void XLogCloseRelationCache(void); extern Relation XLogOpenRelation(RelFileNode rnode); extern void XLogDropRelation(RelFileNode rnode); extern void XLogDropDatabase(Oid dbid); +extern void XLogTruncateRelation(RelFileNode rnode, BlockNumber nblocks); extern Buffer XLogReadBuffer(Relation reln, BlockNumber blkno, bool init); -- cgit v1.2.1