index d87677d659983451c718cb4a24b5e5cf33e0c19f..5bf9e99bbc86b776ac2488518d3d8626b0fb4e31 100644 (file)
&aggstate->hash_ngroups_limit,
&aggstate->hash_planned_partitions);
find_hash_columns(aggstate);
- build_hash_tables(aggstate);
+
+ /* Skip massive memory allocation if we are just doing EXPLAIN */
+ if (!(eflags & EXEC_FLAG_EXPLAIN_ONLY))
+ build_hash_tables(aggstate);
+
aggstate->table_filled = false;
/* Initialize this to 1, meaning nothing spilled, yet */