Skip to content

Commit

Permalink
Move GUC optimizer_enable_query_parameter to the extension
Browse files Browse the repository at this point in the history
  • Loading branch information
whitehawk committed Dec 26, 2024
1 parent 583ecc3 commit eaa602c
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 15 deletions.
1 change: 1 addition & 0 deletions gpcontrib/orca/include/optimizer/orca_guc.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ extern bool optimizer_force_comprehensive_join_implementation;
extern bool optimizer_enable_replicated_table;
extern bool optimizer_enable_foreign_table;
extern bool optimizer_enable_right_outer_join;
extern bool optimizer_enable_query_parameter;

/* Optimizer plan enumeration related GUCs */
extern bool optimizer_enumerate_plans;
Expand Down
10 changes: 10 additions & 0 deletions gpcontrib/orca/orca_guc.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ bool optimizer_force_comprehensive_join_implementation;
bool optimizer_enable_replicated_table;
bool optimizer_enable_foreign_table;
bool optimizer_enable_right_outer_join;
bool optimizer_enable_query_parameter;

/* Optimizer plan enumeration related GUCs */
bool optimizer_enumerate_plans;
Expand Down Expand Up @@ -891,6 +892,15 @@ struct config_bool configure_names_bool_orca[] = {
NULL,
NULL},

{{"optimizer_enable_query_parameter", PGC_USERSET, DEVELOPER_OPTIONS,
gettext_noop("Enable query parameters in Orca."), NULL,
GUC_NOT_IN_SAMPLE},
&optimizer_enable_query_parameter,
true,
NULL,
NULL,
NULL},

{{"optimizer_enable_coordinator_only_queries", PGC_USERSET,
QUERY_TUNING_METHOD,
gettext_noop("Process coordinator only queries via the optimizer."), NULL,
Expand Down
12 changes: 0 additions & 12 deletions src/backend/utils/misc/guc_gp.c
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,6 @@ bool gp_force_random_redistribution = false;
bool optimizer;
bool optimizer_control = true;

bool optimizer_enable_query_parameter;

/* Analyze related GUCs for external planner */
bool optimizer_analyze_root_partition;
bool optimizer_analyze_midlevel_partition;
Expand Down Expand Up @@ -1943,16 +1941,6 @@ struct config_bool ConfigureNamesBool_gp[] =
false,
NULL, NULL, NULL
},
{
{"optimizer_enable_query_parameter", PGC_USERSET, DEVELOPER_OPTIONS,
gettext_noop("Enable query parameters in Orca."),
NULL,
GUC_NOT_IN_SAMPLE
},
&optimizer_enable_query_parameter,
true,
NULL, NULL, NULL
},
{
{"gp_log_suboverflow_statement", PGC_SUSET, LOGGING_WHAT,
gettext_noop("Enable logging of statements that cause subtransaction overflow."),
Expand Down
2 changes: 0 additions & 2 deletions src/include/utils/guc.h
Original file line number Diff line number Diff line change
Expand Up @@ -427,8 +427,6 @@ extern bool create_restartpoint_on_ckpt_record_replay;
extern bool optimizer;
extern bool optimizer_control; /* controls whether the user can change the setting of the "optimizer" guc */

extern bool optimizer_enable_query_parameter;

/* Analyze related GUCs for external planner */
extern bool optimizer_analyze_root_partition;
extern bool optimizer_analyze_midlevel_partition;
Expand Down
1 change: 0 additions & 1 deletion src/include/utils/unsync_guc_name.h
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,6 @@
"optimizer_control",
"optimizer_enable_master_only_queries",
"optimizer_enable_motions_masteronly_queries",
"optimizer_enable_query_parameter",
"optimizer_replicated_table_insert",
"parallel_leader_participation",
"parallel_setup_cost",
Expand Down

0 comments on commit eaa602c

Please sign in to comment.