pgsql: Further twiddling of nodeHash.c hashtable sizing calculation. - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Further twiddling of nodeHash.c hashtable sizing calculation.
Date
Msg-id E1ZipNb-00051H-II@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Further twiddling of nodeHash.c hashtable sizing calculation.

On reflection, the submitted patch didn't really work to prevent the
request size from exceeding MaxAllocSize, because of the fact that we'd
happily round nbuckets up to the next power of 2 after we'd limited it to
max_pointers.  The simplest way to enforce the limit correctly is to
round max_pointers down to a power of 2 when it isn't one already.

(Note that the constraint to INT_MAX / 2, if it were doing anything useful
at all, is properly applied after that.)

Branch
------
REL9_2_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/ebc7d928a761a6e1d56fc23caf1079722821dc0e

Modified Files
--------------
src/backend/executor/nodeHash.c |    8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Further twiddling of nodeHash.c hashtable sizing calculation.
Next
From: Andres Freund
Date:
Subject: pgsql: Fix hstore_plpython test when python3 is used.