aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/json.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2015-10-04 14:06:40 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2015-10-04 14:06:50 -0400
commita31e64d0652622d4627ffa2123163a43538a3f51 (patch)
treee933a65de734b275b7aa8ed53e0982d67035e8b7 /src/backend/utils/adt/json.c
parent1edd4ec831458e10b524d1473a7de5791aa8753e (diff)
downloadpostgresql-a31e64d0652622d4627ffa2123163a43538a3f51.tar.gz
postgresql-a31e64d0652622d4627ffa2123163a43538a3f51.zip
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.
Diffstat (limited to 'src/backend/utils/adt/json.c')
0 files changed, 0 insertions, 0 deletions