(1) enforce the 1GB limit (probably better for back-patching, if that's necessary)
(2) make it work with hash tables over 1GB
I'm in favor of (2) if there's a good way to do that. It seems a bit stupid not to be able to use fast hash table because there's some artificial limit. Are there any fundamental reasons not to use the MemoryContextAllocHuge fix, proposed by KaiGai-san?
If there are no objections, I will apply the patch for 2) to HEAD and backpatch to 9.5.
--
Simon Riggs http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services