Commits on October 30, 2009
Commits1 commit
0Author
1Committer
0Reviewer
0Reported by
0Co-author
| Credit | Commit | Branches | Thread(s) | Committed |
|---|---|---|---|---|
| CommitterBackported | Make the overflow guards in ExecChooseHashTableSize be more protective. The original coding ensured nbuckets and nbatch didn't exceed INT_MAX, which while not insane on its own terms did nothing to protect subsequent code like "palloc(nbatch * sizeof(BufFile *))". Since enormous join size estimates might well be planner error rather than reality, it seems best to constrain the initial sizes to be not more than work_mem/sizeof(pointer), thus ensuring the allocated arrays don't exceed work_mem. We will allow nbatch to get bigger than that during subsequent ExecHashIncreaseNumBatches calls, but we should still guard against integer overflow in those palloc requests. Per bug #5145 from Bernt Marius Johnsen. | master8.5alpha3REL_19_STABLE8.5alpha3REL_18_STABLE8.5alpha3REL_17_STABLE8.5alpha3REL_16_STABLE8.5alpha3REL_15_STABLE8.5alpha3REL_14_STABLE8.5alpha3REL_13_STABLE8.5alpha3+19 more | Oct 30, 2009 |