From a213f1ee6c5a1bbe1f074ca201975e76ad2ed50c Mon Sep 17 00:00:00 2001 From: Heikki Linnakangas Date: Thu, 12 Jun 2008 09:12:31 +0000 Subject: Refactor XLogOpenRelation() and XLogReadBuffer() in preparation for relation forks. XLogOpenRelation() and the associated light-weight relation cache in xlogutils.c is gone, and XLogReadBuffer() now takes a RelFileNode as argument, instead of Relation. For functions that still need a Relation struct during WAL replay, there's a new function called CreateFakeRelcacheEntry() that returns a fake entry like XLogOpenRelation() used to. --- src/include/access/xlogutils.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/include/access/xlogutils.h') diff --git a/src/include/access/xlogutils.h b/src/include/access/xlogutils.h index 952c7f22e98..b2d5c3be0f1 100644 --- a/src/include/access/xlogutils.h +++ b/src/include/access/xlogutils.h @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/access/xlogutils.h,v 1.23 2008/01/01 19:45:56 momjian Exp $ + * $PostgreSQL: pgsql/src/include/access/xlogutils.h,v 1.24 2008/06/12 09:12:31 heikki Exp $ */ #ifndef XLOG_UTILS_H #define XLOG_UTILS_H @@ -15,15 +15,15 @@ #include "utils/rel.h" -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); +extern Buffer XLogReadBuffer(RelFileNode rnode, BlockNumber blkno, bool init); + +extern Relation CreateFakeRelcacheEntry(RelFileNode rnode); +extern void FreeFakeRelcacheEntry(Relation fakerel); #endif -- cgit v1.2.3