From 5df307c7782518c4a3c19ffd05c7cb591b97e23c Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 6 Aug 2002 02:36:35 +0000 Subject: Restructure local-buffer handling per recent pghackers discussion. The local buffer manager is no longer used for newly-created relations (unless they are TEMP); a new non-TEMP relation goes through the shared bufmgr and thus will participate normally in checkpoints. But TEMP relations use the local buffer manager throughout their lifespan. Also, operations in TEMP relations are not logged in WAL, thus improving performance. Since it's no longer necessary to fsync relations as they move out of the local buffers into shared buffers, quite a lot of smgr.c/md.c/fd.c code is no longer needed and has been removed: there's no concept of a dirty relation anymore in md.c/fd.c, and we never fsync anything but WAL. Still TODO: improve local buffer management algorithms so that it would be reasonable to increase NLocBuffer. --- src/include/utils/rel.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/include/utils/rel.h') diff --git a/src/include/utils/rel.h b/src/include/utils/rel.h index 3dce1757ed4..d913f28aba3 100644 --- a/src/include/utils/rel.h +++ b/src/include/utils/rel.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: rel.h,v 1.60 2002/06/20 20:29:53 momjian Exp $ + * $Id: rel.h,v 1.61 2002/08/06 02:36:35 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -112,10 +112,10 @@ typedef struct RelationData BlockNumber rd_targblock; /* current insertion target block, or * InvalidBlockNumber */ int rd_refcnt; /* reference count */ - bool rd_myxactonly; /* rel uses the local buffer mgr */ + bool rd_isnew; /* rel was created in current xact */ + bool rd_istemp; /* rel uses the local buffer mgr */ bool rd_isnailed; /* rel is nailed in cache */ bool rd_indexfound; /* true if rd_indexlist is valid */ - bool rd_uniqueindex; /* true if rel is a UNIQUE index */ Form_pg_class rd_rel; /* RELATION tuple */ TupleDesc rd_att; /* tuple descriptor */ Oid rd_id; /* relation's object id */ -- cgit v1.2.3