From: | tgl(at)postgresql(dot)org (Tom Lane) |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Tweak dynahash.c to avoid wasting memory space in non-shared hash |
Date: | 2006-06-25 18:29:49 |
Message-ID: | 20060625182949.498859FA378@postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Log Message:
-----------
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.
Modified Files:
--------------
pgsql/src/backend/utils/hash:
dynahash.c (r1.67 -> r1.68)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/hash/dynahash.c.diff?r1=1.67&r2=1.68)
pgsql/src/include/utils:
hsearch.h (r1.42 -> r1.43)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/utils/hsearch.h.diff?r1=1.42&r2=1.43)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2006-06-25 18:29:56 | pgsql: Tweak dynahash.c to avoid wasting memory space in non-shared hash |
Previous Message | Bruce Momjian | 2006-06-25 16:27:41 | pgsql: Add: < * Reuse index tuples that point to rows that are not |