Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 02a2dbe

Browse filesBrowse files
committed
Skip allocating hash table in EXPLAIN-only mode.
This is a backpatch of commit 2cccb62, backpatched due to popular demand. Backpatch to all supported versions. Author: Alexey Bashtanov Discussion: https://www.postgresql.org/message-id/36823f65-050d-ae24-aa4d-a37726998240%40imap.cc
1 parent e7abc11 commit 02a2dbe
Copy full SHA for 02a2dbe

File tree

Expand file treeCollapse file tree

1 file changed

+4
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-1
lines changed

‎src/backend/executor/nodeAgg.c

Copy file name to clipboardExpand all lines: src/backend/executor/nodeAgg.c
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2664,7 +2664,10 @@ ExecInitAgg(Agg *node, EState *estate, int eflags)
26642664

26652665
if (node->aggstrategy == AGG_HASHED)
26662666
{
2667-
build_hash_table(aggstate);
2667+
/* Skip massive memory allocation if we are just doing EXPLAIN */
2668+
if (!(eflags & EXEC_FLAG_EXPLAIN_ONLY))
2669+
build_hash_table(aggstate);
2670+
26682671
aggstate->table_filled = false;
26692672
/* Compute the columns we actually need to hash on */
26702673
aggstate->hash_needed = find_hash_columns(aggstate);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.