aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2006-06-25 18:29:49 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2006-06-25 18:29:49 +0000
commit2924ca67475afa3cc3c1a814b170b61803caeee9 (patch)
treecdd0ec65d32b2fba2bc8ab1bf4db414befb44c62 /src/include
parentf5940e7b345138d71d89547dd8e40af9f7532f83 (diff)
downloadpostgresql-2924ca67475afa3cc3c1a814b170b61803caeee9.tar.gz
postgresql-2924ca67475afa3cc3c1a814b170b61803caeee9.zip
Tweak dynahash.c to avoid wasting memory space in non-shared hash tables.
palloc() will normally round allocation requests up to the next power of 2, so make dynahash choose allocation sizes that are as close to a power of 2 as possible. Back-patch to 8.1 --- the problem exists further back, but a much larger patch would be needed and it doesn't seem worth taking any risks.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/utils/hsearch.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/include/utils/hsearch.h b/src/include/utils/hsearch.h
index 97bab5b85b1..a89be514d90 100644
--- a/src/include/utils/hsearch.h
+++ b/src/include/utils/hsearch.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/utils/hsearch.h,v 1.42 2006/03/05 15:59:07 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/utils/hsearch.h,v 1.43 2006/06/25 18:29:49 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -156,8 +156,6 @@ typedef struct HASHCTL
/* max_dsize value to indicate expansible directory */
#define NO_MAX_DSIZE (-1)
-/* max number of hash elements allocated at once */
-#define HASHELEMENT_ALLOC_MAX (32)
/* hash_search operations */
typedef enum