From e0c9301c87634f21c0a7c6305bdc6da15d6ba375 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Wed, 27 Jun 2001 23:31:40 +0000 Subject: Install infrastructure for shared-memory free space map. Doesn't actually do anything yet, but it has the necessary connections to initialization and so forth. Make some gestures towards allowing number of blocks in a relation to be BlockNumber, ie, unsigned int, rather than signed int. (I doubt I got all the places that are sloppy about it, yet.) On the way, replace the hardwired NLOCKS_PER_XACT fudge factor with a GUC variable. --- src/backend/access/nbtree/nbtpage.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/backend/access/nbtree/nbtpage.c') diff --git a/src/backend/access/nbtree/nbtpage.c b/src/backend/access/nbtree/nbtpage.c index 460d6c834c..67e1407b22 100644 --- a/src/backend/access/nbtree/nbtpage.c +++ b/src/backend/access/nbtree/nbtpage.c @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtpage.c,v 1.51 2001/03/22 03:59:14 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtpage.c,v 1.52 2001/06/27 23:31:38 tgl Exp $ * * NOTES * Postgres btree pages look like ordinary relation pages. The opaque @@ -55,7 +55,6 @@ _bt_metapinit(Relation rel) { Buffer buf; Page pg; - int nblocks; BTMetaPageData metad; BTPageOpaque op; @@ -63,11 +62,9 @@ _bt_metapinit(Relation rel) if (USELOCKING) LockRelation(rel, AccessExclusiveLock); - if ((nblocks = RelationGetNumberOfBlocks(rel)) != 0) - { + if (RelationGetNumberOfBlocks(rel) != 0) elog(ERROR, "Cannot initialize non-empty btree %s", RelationGetRelationName(rel)); - } buf = ReadBuffer(rel, P_NEW); pg = BufferGetPage(buf); -- cgit v1.2.1