Skip to content

Commit 2cccb62

Browse files
committed
Skip allocating hash table in EXPLAIN-only mode.
Author: Alexey Bashtanov Discussion: https://www.postgresql.org/message-id/36823f65-050d-ae24-aa4d-a37726998240%40imap.cc
1 parent dfab7f2 commit 2cccb62

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/backend/executor/nodeAgg.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3665,7 +3665,11 @@ ExecInitAgg(Agg *node, EState *estate, int eflags)
36653665
&aggstate->hash_ngroups_limit,
36663666
&aggstate->hash_planned_partitions);
36673667
find_hash_columns(aggstate);
3668-
build_hash_tables(aggstate);
3668+
3669+
/* Skip massive memory allocation if we are just doing EXPLAIN */
3670+
if (!(eflags & EXEC_FLAG_EXPLAIN_ONLY))
3671+
build_hash_tables(aggstate);
3672+
36693673
aggstate->table_filled = false;
36703674

36713675
/* Initialize this to 1, meaning nothing spilled, yet */

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy