Re: Hot Standby, release candidate? - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Hot Standby, release candidate?
Date
Msg-id 1260833017.1955.2674.camel@ebony
Whole thread Raw
In response to Re: Hot Standby, release candidate?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Mon, 2009-12-14 at 16:39 -0500, Tom Lane wrote:
> Simon Riggs <simon@2ndQuadrant.com> writes:
> > What is the best way of restricting the hash table to a maximum size? 
> 
> There is nothing in dynahash that will enforce a maximum size against
> calling code that's not cooperating; and I'll resist any attempt to
> add such a thing, because it would create a serialization point across
> the whole hashtable.

No problem, just checking with you where you'd like stuff put.

> If you know that you need at most N entries in the hash table, you can
> preallocate that many at startup (note the second arg to ShmemInitHash)
> and be safe.  If your calling code might go past that, you'll need to
> fix the calling code.

It's easy enough to count em on the way in and count em on the way out.

-- Simon Riggs           www.2ndQuadrant.com



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Hot Standby, release candidate?
Next
From: Tom Lane
Date:
Subject: Re: Range types