projects
/
postgresql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dfab7f2
)
Skip allocating hash table in EXPLAIN-only mode.
author
Heikki Linnakangas
Wed, 18 Nov 2020 10:39:15 +0000
(12:39 +0200)
committer
Heikki Linnakangas
Wed, 18 Nov 2020 10:39:15 +0000
(12:39 +0200)
Author: Alexey Bashtanov
Discussion: https://www.postgresql.org/message-id/
36823f65
-050d-ae24-aa4d-
a37726998240
%40imap.cc
src/backend/executor/nodeAgg.c
patch
|
blob
|
blame
|
history
diff --git
a/src/backend/executor/nodeAgg.c
b/src/backend/executor/nodeAgg.c
index d87677d659983451c718cb4a24b5e5cf33e0c19f..5bf9e99bbc86b776ac2488518d3d8626b0fb4e31 100644
(file)
--- a/
src/backend/executor/nodeAgg.c
+++ b/
src/backend/executor/nodeAgg.c
@@
-3665,7
+3665,11
@@
ExecInitAgg(Agg *node, EState *estate, int eflags)
&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 */