aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/misc/guc.c
diff options
context:
space:
mode:
authorJeff Davis <jdavis@postgresql.org>2020-06-11 11:58:16 -0700
committerJeff Davis <jdavis@postgresql.org>2020-06-11 13:05:37 -0700
commit13e0fa7ae50cd0e91158877dba37098492b234e8 (patch)
tree5f0b7f40a63aab5ce3a658bb967b568b0afba5a1 /src/backend/utils/misc/guc.c
parent6df7105e5d50460623421d00f24aaa46b66fa570 (diff)
downloadpostgresql-13e0fa7ae50cd0e91158877dba37098492b234e8.tar.gz
postgresql-13e0fa7ae50cd0e91158877dba37098492b234e8.zip
Rework HashAgg GUCs.
Eliminate enable_groupingsets_hash_disk, which was primarily useful for testing grouping sets that use HashAgg and spill. Instead, hack the table stats to convince the planner to choose hashed aggregation for grouping sets that will spill to disk. Suggested by Melanie Plageman. Rename enable_hashagg_disk to hashagg_avoid_disk_plan, and invert the meaning of on/off. The new name indicates more strongly that it only affects the planner. Also, the word "avoid" is less definite, which should avoid surprises when HashAgg still needs to use the disk. Change suggested by Justin Pryzby, though I chose a different GUC name. Discussion: https://postgr.es/m/CAAKRu_aisiENMsPM2gC4oUY1hHG3yrCwY-fXUg22C6_MJUwQdA%40mail.gmail.com Discussion: https://postgr.es/m/20200610021544.GA14879@telsasoft.com Backpatch-through: 13
Diffstat (limited to 'src/backend/utils/misc/guc.c')
-rw-r--r--src/backend/utils/misc/guc.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index 17c15348efc..fe7e2f8b913 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -1011,22 +1011,12 @@ static struct config_bool ConfigureNamesBool[] =
NULL, NULL, NULL
},
{
- {"enable_hashagg_disk", PGC_USERSET, QUERY_TUNING_METHOD,
- gettext_noop("Enables the planner's use of hashed aggregation plans that are expected to exceed work_mem."),
+ {"hashagg_avoid_disk_plan", PGC_USERSET, QUERY_TUNING_METHOD,
+ gettext_noop("Causes the planner to avoid hashed aggregation plans that are expected to use the disk."),
NULL,
GUC_EXPLAIN
},
- &enable_hashagg_disk,
- true,
- NULL, NULL, NULL
- },
- {
- {"enable_groupingsets_hash_disk", PGC_USERSET, QUERY_TUNING_METHOD,
- gettext_noop("Enables the planner's use of hashed aggregation plans for groupingsets when the total size of the hash tables is expected to exceed work_mem."),
- NULL,
- GUC_EXPLAIN
- },
- &enable_groupingsets_hash_disk,
+ &hashagg_avoid_disk_plan,
false,
NULL, NULL, NULL
},