On Thu, Jul 22, 2021 at 09:36:02AM -0700, Peter Geoghegan wrote: > I don't see how it's possible for get_hash_mem() to be unable to > return a hash_mem value that could be represented by work_mem > directly. MAX_KILOBYTES is an annoyingly low limit on Windows, where > sizeof(long) is 4. But that's nothing new. Oh. So the problem seems to be that: 1) In v12, HashAgg now obeyes work_mem*hash_mem_multiplier; 2) Under windows, work_mem is limited to 2GB. -- Justin