summaryrefslogtreecommitdiff
path: root/src/backend/utils/misc/guc_tables.c
diff options
context:
space:
mode:
authorDavid Rowley <drowley@postgresql.org>2023-02-15 21:21:59 +1300
committerDavid Rowley <drowley@postgresql.org>2023-02-15 21:21:59 +1300
commit5352ca22e0012d48055453ca9992a9515d811291 (patch)
treeb247f2abbca2b0198280a69117a175c93fe4241b /src/backend/utils/misc/guc_tables.c
parent8e0e0698f12bd77da38f6863ecdbe88a63ed49dc (diff)
Rename force_parallel_mode to debug_parallel_query
force_parallel_mode is meant to be used to allow us to exercise the parallel query infrastructure to ensure that it's working as we expect. It seems some users think this GUC is for forcing the query planner into picking a parallel plan regardless of the costs. A quick look at the documentation would have made them realize that they were wrong, but the GUC is likely too conveniently named which, evidently, seems to often result in users expecting that it forces the planner into usefully parallelizing queries. Here we rename the GUC to something which casual users are less likely to mistakenly think is what they need to make their query run more quickly. For now, the old name can still be used. We'll revisit if the old name mapping can be removed once the buildfarm configs are all updated. Reviewed-by: John Naylor Discussion: https://postgr.es/m/CAApHDvrsOi92_uA7PEaHZMH-S4Xv+MGhQWA+GrP8b1kjpS1HjQ@mail.gmail.com
Diffstat (limited to 'src/backend/utils/misc/guc_tables.c')
-rw-r--r--src/backend/utils/misc/guc_tables.c32
1 files changed, 17 insertions, 15 deletions
diff --git a/src/backend/utils/misc/guc_tables.c b/src/backend/utils/misc/guc_tables.c
index b46e3b8c558..43b9d926600 100644
--- a/src/backend/utils/misc/guc_tables.c
+++ b/src/backend/utils/misc/guc_tables.c
@@ -360,16 +360,16 @@ static const struct config_enum_entry recovery_prefetch_options[] = {
{NULL, 0, false}
};
-static const struct config_enum_entry force_parallel_mode_options[] = {
- {"off", FORCE_PARALLEL_OFF, false},
- {"on", FORCE_PARALLEL_ON, false},
- {"regress", FORCE_PARALLEL_REGRESS, false},
- {"true", FORCE_PARALLEL_ON, true},
- {"false", FORCE_PARALLEL_OFF, true},
- {"yes", FORCE_PARALLEL_ON, true},
- {"no", FORCE_PARALLEL_OFF, true},
- {"1", FORCE_PARALLEL_ON, true},
- {"0", FORCE_PARALLEL_OFF, true},
+static const struct config_enum_entry debug_parallel_query_options[] = {
+ {"off", DEBUG_PARALLEL_OFF, false},
+ {"on", DEBUG_PARALLEL_ON, false},
+ {"regress", DEBUG_PARALLEL_REGRESS, false},
+ {"true", DEBUG_PARALLEL_ON, true},
+ {"false", DEBUG_PARALLEL_OFF, true},
+ {"yes", DEBUG_PARALLEL_ON, true},
+ {"no", DEBUG_PARALLEL_OFF, true},
+ {"1", DEBUG_PARALLEL_ON, true},
+ {"0", DEBUG_PARALLEL_OFF, true},
{NULL, 0, false}
};
@@ -4852,13 +4852,15 @@ struct config_enum ConfigureNamesEnum[] =
},
{
- {"force_parallel_mode", PGC_USERSET, DEVELOPER_OPTIONS,
- gettext_noop("Forces use of parallel query facilities."),
- gettext_noop("If possible, run query using a parallel worker and with parallel restrictions."),
+ {"debug_parallel_query", PGC_USERSET, DEVELOPER_OPTIONS,
+ gettext_noop("Forces the planner's use parallel query nodes."),
+ gettext_noop("This can be useful for testing the parallel query infrastructure "
+ "by forcing the planner to generate plans which contains nodes "
+ "which perform tuple communication between workers and the main process."),
GUC_NOT_IN_SAMPLE | GUC_EXPLAIN
},
- &force_parallel_mode,
- FORCE_PARALLEL_OFF, force_parallel_mode_options,
+ &debug_parallel_query,
+ DEBUG_PARALLEL_OFF, debug_parallel_query_options,
NULL, NULL, NULL
},