pgsql: Tweaks for SSI out-of-shared memory behavior.

From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Tweaks for SSI out-of-shared memory behavior.
Date: 2011-04-07 20:48:36
Message-ID: E1Q7w84-0001sA-TU@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Tweaks for SSI out-of-shared memory behavior.

If we call hash_search() with HASH_ENTER, it will bail out rather than
return NULL, so it's redundant to check for NULL again in the caller.
Thus, in cases where we believe it's impossible for the hash table to run
out of slots anyway, we can simplify the code slightly.

On the flip side, in cases where it's theoretically possible to run out of
space, we don't want to rely on dynahash.c to throw an error; instead,
we pass HASH_ENTER_NULL and throw the error ourselves if a NULL comes
back, so that we can provide a more descriptive error message.

Kevin Grittner

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/56c7140ca813ba4c7ecb122a1d2b1268e705d092

Modified Files
--------------
src/backend/storage/lmgr/predicate.c | 18 +++++-------------
1 files changed, 5 insertions(+), 13 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2011-04-07 21:01:41 Re: [COMMITTERS] pgsql: Add traceback information to PL/Python errors
Previous Message Tom Lane 2011-04-07 19:15:27 pgsql: Modernize dlopen interface code for FreeBSD and OpenBSD.