1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

Tweak dynahash.c to not allocate so many entries at once when dealing

with a table that has a small predicted size.  Avoids wasting several
hundred K on the timezone hash table, which is likely to have only one
or a few entries, but the entries use up 10Kb apiece ...
This commit is contained in:
Tom Lane
2005-06-26 23:32:34 +00:00
parent 943b396245
commit 06ae88a82e
3 changed files with 22 additions and 13 deletions

View File

@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/timezone/pgtz.c,v 1.35 2005/06/20 08:00:51 neilc Exp $
* $PostgreSQL: pgsql/src/timezone/pgtz.c,v 1.36 2005/06/26 23:32:34 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -978,7 +978,7 @@ init_timezone_hashtable(void)
hash_ctl.entrysize = sizeof(pg_tz);
timezone_cache = hash_create("Timezones",
31,
4,
&hash_ctl,
HASH_ELEM);
if (!timezone_cache)