mirror of
https://github.com/postgres/postgres.git
synced 2025-06-13 07:41:39 +03:00
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
This commit is contained in:
@ -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
|
||||
},
|
||||
|
||||
|
Reference in New Issue
Block a user