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

From Robert Haas
Subject pgsql: Tweaks for SSI out-of-shared memory behavior.
Date
Msg-id E1Q7w84-0001sA-TU@gemulon.postgresql.org
Whole thread Raw
List 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(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Modernize dlopen interface code for FreeBSD and OpenBSD.
Next
From: Andrew Dunstan
Date:
Subject: pgsql: Avoid use of mixed slash style paths in arguments to xcopy in MS