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

Re: SSI bug?

From: Dan Ports <drkp(at)csail(dot)mit(dot)edu>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>,Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>,YAMAMOTO Takashi <yamt(at)mwd(dot)biglobe(dot)ne(dot)jp>,pgsql-hackers(at)postgresql(dot)org
Subject: Re: SSI bug?
Date: 2011-03-26 21:54:52
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Fri, Mar 25, 2011 at 04:06:30PM -0400, Tom Lane wrote:
> Up to now, I believe the lockmgr's lock table is the only shared hash
> table that is expected to grow past the declared size; that can happen
> anytime a session exceeds max_locks_per_transaction, which we consider
> to be only a soft limit.  I don't know whether SSI has introduced any
> other hash tables that behave similarly.  (If it has, we might want to
> rethink the amount of "slop" space we leave in shmem...)

I looked into this recently and the two lockmgr tables were indeed the
only ones that could vary in size. IIRC, the only other shared hash
tables were the shared buffer index and the shmem index.

SSI adds two more analogous tables (per-lock-target and per-xact-lock),
both of which are sized according to max_pred_locks_per_transaction,
which is also a soft limit. It also adds a per-transaction shared hash
table, but that has a clear maximum size.

I find the soft limit on htab size a strange model, and I suspect it
might be a source of problems now that we've got more than one table
that can actually exceed it its limit. (Particularly so given that once
shmem gets allocated to one htab, there's no getting it back.)


Dan R. K. Ports              MIT CSAIL      

In response to

pgsql-hackers by date

Next:From: Jeff JanesDate: 2011-03-26 22:01:46
Subject: Re: 2nd Level Buffer Cache
Previous:From: Pavel StehuleDate: 2011-03-26 21:26:55
Subject: Re: WIP: Allow SQL-language functions to reference parameters by parameter name

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