summaryrefslogtreecommitdiff
path: root/src/include/access/hash.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/access/hash.h')
-rw-r--r--src/include/access/hash.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/include/access/hash.h b/src/include/access/hash.h
index 83aae20c1c..045fb40c40 100644
--- a/src/include/access/hash.h
+++ b/src/include/access/hash.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: hash.h,v 1.50 2003/09/01 20:26:34 tgl Exp $
+ * $Id: hash.h,v 1.51 2003/09/02 02:18:38 tgl Exp $
*
* NOTES
* modeled after Margo Seltzer's hash implementation for unix.
@@ -25,13 +25,12 @@
/*
* Mapping from hash bucket number to physical block number of bucket's
- * starting page. Beware of multiple evaluations of argument! Also notice
- * macro's implicit dependency on "metap".
+ * starting page. Beware of multiple evaluations of argument!
*/
typedef uint32 Bucket;
-#define BUCKET_TO_BLKNO(B) \
- ((BlockNumber) ((B) + ((B) ? metap->hashm_spares[_hash_log2((B)+1)-1] : 0)) + 1)
+#define BUCKET_TO_BLKNO(metap,B) \
+ ((BlockNumber) ((B) + ((B) ? (metap)->hashm_spares[_hash_log2((B)+1)-1] : 0)) + 1)
/*
* Special space for hash index pages.
@@ -243,8 +242,8 @@ extern Buffer _hash_addovflpage(Relation rel, Buffer metabuf, Buffer buf);
extern BlockNumber _hash_freeovflpage(Relation rel, Buffer ovflbuf);
extern void _hash_initbitmap(Relation rel, HashMetaPage metap,
BlockNumber blkno);
-extern void _hash_squeezebucket(Relation rel, HashMetaPage metap,
- Bucket bucket);
+extern void _hash_squeezebucket(Relation rel,
+ Bucket bucket, BlockNumber bucket_blkno);
/* hashpage.c */
extern void _hash_metapinit(Relation rel);