mirror of
https://github.com/postgres/postgres.git
synced 2025-08-22 21:53:06 +03:00
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.
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user