The query planner can now consider using hash aggregation if it expects the aggregate to exceed working memory.
This can be controlled by two configuration parameters: