pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@postgresql.org
Subject: pgsql: Further twiddling of nodeHash.c hashtable sizing calculation.
Date: Sun, 04 Oct 2015 19:55:31 +0000
Message-ID: <E1ZipNb-00051H-II@gemulon.postgresql.org> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


view thread (7+ messages)  latest in thread

Message-ID: <E1ZipNb-00051H-II@gemulon.postgresql.org>
Permalink:  ../E1ZipNb-00051H-II@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1ZipNb-00051H-II@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Further twiddling of nodeHash.c hashtable sizing calculation.
  In-Reply-To: <E1ZipNb-00051H-II@gemulon.postgresql.org>
  References: <E1ZipNb-00051H-II@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox