Skip site navigation (1) Skip section navigation (2)

pgsql: Tweak dynahash.c to avoid wasting memory space in non-shared hash

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:56
Message-ID: 20060625182956.694749FA4A5@postgresql.org (view raw or flat)
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.

Tags:
----
REL8_1_STABLE

Modified Files:
--------------
    pgsql/src/backend/utils/hash:
        dynahash.c (r1.65.2.1 -> r1.65.2.2)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/hash/dynahash.c.diff?r1=1.65.2.1&r2=1.65.2.2)
    pgsql/src/include/utils:
        hsearch.h (r1.41 -> r1.41.2.1)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/utils/hsearch.h.diff?r1=1.41&r2=1.41.2.1)

pgsql-committers by date

Next:From: Bruce MomjianDate: 2006-06-25 18:52:03
Subject: pgsql: Update my info: > * Bruce is Bruce Momjian <bruce@momjian.us> of
Previous:From: Tom LaneDate: 2006-06-25 18:29:49
Subject: pgsql: Tweak dynahash.c to avoid wasting memory space in non-shared hash

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group