Tweaks for SSI out-of-shared memory behavior.

Robert Haas <rhaas@postgresql.org>

Commit: 56c7140ca813ba4c7ecb122a1d2b1268e705d092
Author: Robert Haas <rhaas@postgresql.org>
Date: 2011-04-07T20:43:39Z
Releases: 9.1.0
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

Files

PathChange+/−
src/backend/storage/lmgr/predicate.c modified +5 −13