diff options
author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2008-08-11 11:05:11 +0000 |
---|---|---|
committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2008-08-11 11:05:11 +0000 |
commit | 3f0e808c4a487b1c12546acd80e6140d5093227b (patch) | |
tree | 2ebd25f364f751d6591ae27f18588041dec4d978 /src/include/access/xlogutils.h | |
parent | eca1388629facd9e65d2c7ce405e079ba2bc60c4 (diff) | |
download | postgresql-3f0e808c4a487b1c12546acd80e6140d5093227b.tar.gz postgresql-3f0e808c4a487b1c12546acd80e6140d5093227b.zip |
Introduce the concept of relation forks. An smgr relation can now consist
of multiple forks, and each fork can be created and grown separately.
The bulk of this patch is about changing the smgr API to include an extra
ForkNumber argument in every smgr function. Also, smgrscheduleunlink and
smgrdounlink no longer implicitly call smgrclose, because other forks might
still exist after unlinking one. The callers of those functions have been
modified to call smgrclose instead.
This patch in itself doesn't have any user-visible effect, but provides the
infrastructure needed for upcoming patches. The additional forks envisioned
are a rewritten FSM implementation that doesn't rely on a fixed-size shared
memory block, and a visibility map to allow skipping portions of a table in
VACUUM that have no dead tuples.
Diffstat (limited to 'src/include/access/xlogutils.h')
-rw-r--r-- | src/include/access/xlogutils.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/include/access/xlogutils.h b/src/include/access/xlogutils.h index f1585c032a5..0c81d42e44d 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.25 2008/06/19 00:46:06 alvherre Exp $ + * $PostgreSQL: pgsql/src/include/access/xlogutils.h,v 1.26 2008/08/11 11:05:11 heikki Exp $ */ #ifndef XLOG_UTILS_H #define XLOG_UTILS_H @@ -19,11 +19,14 @@ extern void XLogCheckInvalidPages(void); -extern void XLogDropRelation(RelFileNode rnode); +extern void XLogDropRelation(RelFileNode rnode, ForkNumber forknum); extern void XLogDropDatabase(Oid dbid); -extern void XLogTruncateRelation(RelFileNode rnode, BlockNumber nblocks); +extern void XLogTruncateRelation(RelFileNode rnode, ForkNumber forkNum, + BlockNumber nblocks); extern Buffer XLogReadBuffer(RelFileNode rnode, BlockNumber blkno, bool init); +extern Buffer XLogReadBufferWithFork(RelFileNode rnode, ForkNumber forknum, + BlockNumber blkno, bool init); extern Relation CreateFakeRelcacheEntry(RelFileNode rnode); extern void FreeFakeRelcacheEntry(Relation fakerel); |