From 3f0e808c4a487b1c12546acd80e6140d5093227b Mon Sep 17 00:00:00 2001 From: Heikki Linnakangas Date: Mon, 11 Aug 2008 11:05:11 +0000 Subject: 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. --- src/backend/utils/adt/dbsize.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/backend/utils/adt/dbsize.c') diff --git a/src/backend/utils/adt/dbsize.c b/src/backend/utils/adt/dbsize.c index c358cdea7b4..e85d11c3834 100644 --- a/src/backend/utils/adt/dbsize.c +++ b/src/backend/utils/adt/dbsize.c @@ -5,7 +5,7 @@ * Copyright (c) 2002-2008, PostgreSQL Global Development Group * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/utils/adt/dbsize.c,v 1.19 2008/06/19 00:46:05 alvherre Exp $ + * $PostgreSQL: pgsql/src/backend/utils/adt/dbsize.c,v 1.20 2008/08/11 11:05:11 heikki Exp $ * */ @@ -255,7 +255,8 @@ calculate_relation_size(RelFileNode *rfn) char pathname[MAXPGPATH]; unsigned int segcount = 0; - relationpath = relpath(*rfn); + /* XXX: This ignores the other forks. */ + relationpath = relpath(*rfn, MAIN_FORKNUM); for (segcount = 0;; segcount++) { -- cgit v1.2.3