pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
To: Kevin Grittner <Kevin.Grittner@wicourts.gov>
Cc: Dan Ports <drkp@csail.mit.edu>
Cc: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
Cc: pgsql-hackers@postgresql.org
Subject: Re: SSI bug?
Date: Mon, 11 Apr 2011 13:58:40 +0300
Message-ID: <4DA2DEE0.50801@enterprisedb.com> (raw)
In-Reply-To: <4DA2BCC2.7080903@enterprisedb.com>
References: <4D8F54E6020000250003BD16@gw.wicourts.gov>
	<4D8F54E6020000250003BD16@gw.wicourts.gov>
	<20110328031616.CDAA719CEDF@mail.netbsd.org>
	<4D943BEC020000250003BFDA@gw.wicourts.gov>
	<4D94A2BB.3090605@enterprisedb.com>
	<4D946036020000250003BFFC@gw.wicourts.gov>
	<20110331181216.GF81592@csail.mit.edu>
	<4D948066020000250003C00B@gw.wicourts.gov>
	<4D94C889.3050607@enterprisedb.com>
	<4D948A7D020000250003C012@gw.wicourts.gov>
	<4DA2BCC2.7080903@enterprisedb.com>

On 11.04.2011 11:33, Heikki Linnakangas wrote:
> On 31.03.2011 22:06, Kevin Grittner wrote:
>> Heikki Linnakangas<heikki.linnakangas@enterprisedb.com> wrote:
>>
>>> 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.
>>
>> OK. If we're doing that, is it worth taking a look at the "safety
>> margin" added to the size calculations, and try to make the
>> calculations more accurate?
>>
>> Would you like me to code a patch for this?
>
> I finally got around to look at this. Attached patch adds a
> HASH_FIXED_SIZE flag, which disables the allocation of new entries after
> the initial allocation. I believe we have consensus to make the
> predicate lock hash tables fixed-size, so that there's no competition of
> the slack shmem space between predicate lock structures and the regular
> lock maanager.

Ok, committed that.

I left the safety margins in the size calculations alone for now.

-- 
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com



view thread (71+ messages)  latest in thread

Message-ID: <4DA2DEE0.50801@enterprisedb.com>
Permalink:  ../4DA2DEE0.50801@enterprisedb.com/
Also on:    postgresql.org/message-id/4DA2DEE0.50801@enterprisedb.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: heikki.linnakangas@enterprisedb.com, Kevin.Grittner@wicourts.gov, drkp@csail.mit.edu, yamt@mwd.biglobe.ne.jp
  Subject: Re: SSI bug?
  In-Reply-To: <4DA2DEE0.50801@enterprisedb.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox