pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix some issues in new hashtable size calculations in nodeHash.c
2+ messages / 1 participants
[nested] [flat]

* pgsql: Fix some issues in new hashtable size calculations in nodeHash.c
@ 2015-10-04 18:07  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2015-10-04 18:07 UTC (permalink / raw)
  To: pgsql-committers

Fix some issues in new hashtable size calculations in nodeHash.c.

Limit the size of the hashtable pointer array to not more than
MaxAllocSize, per reports from Kouhei Kaigai and others of "invalid memory
alloc request size" failures.  There was discussion of allowing the array
to get larger than that by using the "huge" palloc API, but so far no proof
that that is actually a good idea, and at this point in the 9.5 cycle major
changes from old behavior don't seem like the way to go.

Fix a rather serious secondary bug in the new code, which was that it
didn't ensure nbuckets remained a power of 2 when recomputing it for the
multiple-batch case.

Clean up sloppy division of labor between ExecHashIncreaseNumBuckets and
its sole call site.

Branch
------
REL9_5_STABLE

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

Modified Files
--------------
src/backend/executor/nodeHash.c |   60 +++++++++++++++++++--------------------
src/include/executor/hashjoin.h |    2 +-
2 files changed, 31 insertions(+), 31 deletions(-)


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


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: Fix some issues in new hashtable size calculations in nodeHash.c
@ 2015-10-04 18:07  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2015-10-04 18:07 UTC (permalink / raw)
  To: pgsql-committers

Fix some issues in new hashtable size calculations in nodeHash.c.

Limit the size of the hashtable pointer array to not more than
MaxAllocSize, per reports from Kouhei Kaigai and others of "invalid memory
alloc request size" failures.  There was discussion of allowing the array
to get larger than that by using the "huge" palloc API, but so far no proof
that that is actually a good idea, and at this point in the 9.5 cycle major
changes from old behavior don't seem like the way to go.

Fix a rather serious secondary bug in the new code, which was that it
didn't ensure nbuckets remained a power of 2 when recomputing it for the
multiple-batch case.

Clean up sloppy division of labor between ExecHashIncreaseNumBuckets and
its sole call site.

Branch
------
master

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

Modified Files
--------------
src/backend/executor/nodeHash.c |   60 +++++++++++++++++++--------------------
src/include/executor/hashjoin.h |    2 +-
2 files changed, 31 insertions(+), 31 deletions(-)


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


^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2015-10-04 18:07 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-10-04 18:07 pgsql: Fix some issues in new hashtable size calculations in nodeHash.c Tom Lane <tgl@sss.pgh.pa.us>
2015-10-04 18:07 pgsql: Fix some issues in new hashtable size calculations in nodeHash.c Tom Lane <tgl@sss.pgh.pa.us>

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