aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/nbtree/nbtpage.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2001-06-27 23:31:40 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2001-06-27 23:31:40 +0000
commite0c9301c87634f21c0a7c6305bdc6da15d6ba375 (patch)
treeaad976ca0197137c3461ff19a3d0e155487f7b44 /src/backend/access/nbtree/nbtpage.c
parentb559382134a52bbe1d79d465afd89c8385f88581 (diff)
downloadpostgresql-e0c9301c87634f21c0a7c6305bdc6da15d6ba375.tar.gz
postgresql-e0c9301c87634f21c0a7c6305bdc6da15d6ba375.zip
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.
Diffstat (limited to 'src/backend/access/nbtree/nbtpage.c')
-rw-r--r--src/backend/access/nbtree/nbtpage.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/backend/access/nbtree/nbtpage.c b/src/backend/access/nbtree/nbtpage.c
index 460d6c834c1..67e1407b22b 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);