From: | Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> |
---|---|
To: | Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov> |
Cc: | Dan Ports <drkp(at)csail(dot)mit(dot)edu>, YAMAMOTO Takashi <yamt(at)mwd(dot)biglobe(dot)ne(dot)jp>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: SSI bug? |
Date: | 2011-03-31 18:31:37 |
Message-ID: | 4D94C889.3050607@enterprisedb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 31.03.2011 21:23, Kevin Grittner wrote:
> Dan Ports<drkp(at)csail(dot)mit(dot)edu> wrote:
>> On Thu, Mar 31, 2011 at 11:06:30AM -0500, Kevin Grittner wrote:
>>> The only thing I've been on the fence about is whether it
>>> makes more sense to allocate it all up front or to continue to
> allow
>>> incremental allocation but set a hard limit on the number of
> entries
>>> allocated for each shared memory HTAB. Is there a performance-
>>> related reason to choose one path or the other?
>>
>> Seems like it would be marginally better to allocate it up front --
> then
>> you don't have the cost of having to split buckets later as it
> grows.
>
> The attached patch should cover that.
That's not enough. The hash tables can grow beyond the maximum size you
specify in ShmemInitHash. It's just a hint to size the directory within
the hash table.
We'll need to teach dynahash not to allocate any more entries after the
preallocation. A new HASH_NO_GROW flag to hash_create() seems like a
suitable interface.
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Brendan Jurd | 2011-03-31 18:46:14 | Re: [HACKERS] Date conversion using day of week |
Previous Message | Kevin Grittner | 2011-03-31 18:23:50 | Re: SSI bug? |