From 4af3421161ce7847a019ec0799c898586574801f Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sat, 8 May 2004 19:09:25 +0000 Subject: Get rid of rd_nblocks field in relcache entries. Turns out this was costing us lots more to maintain than it was worth. On shared tables it was of exactly zero benefit because we couldn't trust it to be up to date. On temp tables it sometimes saved an lseek, but not often enough to be worth getting excited about. And the real problem was that we forced an lseek on every relcache flush in order to update the field. So all in all it seems best to lose the complexity. --- src/include/utils/rel.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/include/utils') diff --git a/src/include/utils/rel.h b/src/include/utils/rel.h index 8532c5a737a..e5008e56ea5 100644 --- a/src/include/utils/rel.h +++ b/src/include/utils/rel.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/utils/rel.h,v 1.73 2004/02/10 01:55:27 tgl Exp $ + * $PostgreSQL: pgsql/src/include/utils/rel.h,v 1.74 2004/05/08 19:09:25 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -107,7 +107,6 @@ typedef struct RelationData RelFileNode rd_node; /* relation physical identifier */ /* use "struct" here to avoid needing to include smgr.h: */ struct SMgrRelationData *rd_smgr; /* cached file handle, or NULL */ - BlockNumber rd_nblocks; /* number of blocks in rel */ BlockNumber rd_targblock; /* current insertion target block, or * InvalidBlockNumber */ int rd_refcnt; /* reference count */ -- cgit v1.2.3