OSDN Git Service

Introduce the concept of relation forks. An smgr relation can now consist
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Mon, 11 Aug 2008 11:05:11 +0000 (11:05 +0000)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Mon, 11 Aug 2008 11:05:11 +0000 (11:05 +0000)
commit3f0e808c4a487b1c12546acd80e6140d5093227b
tree2ebd25f364f751d6591ae27f18588041dec4d978
parenteca1388629facd9e65d2c7ce405e079ba2bc60c4
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.
31 files changed:
src/backend/access/hash/hashpage.c
src/backend/access/heap/heapam.c
src/backend/access/heap/rewriteheap.c
src/backend/access/nbtree/nbtsort.c
src/backend/access/transam/twophase.c
src/backend/access/transam/xact.c
src/backend/access/transam/xlog.c
src/backend/access/transam/xlogutils.c
src/backend/catalog/catalog.c
src/backend/catalog/heap.c
src/backend/catalog/index.c
src/backend/commands/tablecmds.c
src/backend/postmaster/bgwriter.c
src/backend/rewrite/rewriteDefine.c
src/backend/storage/buffer/bufmgr.c
src/backend/storage/buffer/localbuf.c
src/backend/storage/smgr/README
src/backend/storage/smgr/md.c
src/backend/storage/smgr/smgr.c
src/backend/utils/adt/dbsize.c
src/include/access/heapam.h
src/include/access/htup.h
src/include/access/xact.h
src/include/access/xlog_internal.h
src/include/access/xlogutils.h
src/include/catalog/catalog.h
src/include/postmaster/bgwriter.h
src/include/storage/buf_internals.h
src/include/storage/bufmgr.h
src/include/storage/relfilenode.h
src/include/storage/smgr.h