Re: Hash support for grouping sets
Andrew Gierth <andrew@tao11.riddles.org.uk>
From: Andrew Gierth <andrew@tao11.riddles.org.uk>
To: Mark Dilger <hornschnorter@gmail.com>
Cc: pgsql-hackers@postgresql.org
Date: 2017-03-15T21:51:55Z
Lists: pgsql-hackers
Attachments
- gshash25.patch (text/x-patch) patch
Another small update to the patch, this time to eliminate any possibility of integer overflow when handling extremely large estimated groupings. Key change: - k_weights[i] = (int) floor(sz / scale); + /* + * If sz is enormous, but work_mem (and hence scale) is + * small, avoid integer overflow here. + */ + k_weights[i] = (int) Min(floor(sz / scale), + k_capacity + 1.0); -- Andrew (irc:RhodiumToad)
Commits
-
Support hashed aggregation with grouping sets.
- b5635948ab16 10.0 landed