guc_gp.c 170.3 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
/*--------------------------------------------------------------------
 * guc_gp.c
 *
 * Additional Greenplum-specific GUCs are defined in this file, to
 * avoid adding so much stuff to guc.c. This makes it easier to diff
 * and merge with upstream.
 *
 * Portions Copyright (c) 2005-2010, Greenplum inc
 * Copyright (c) 2000-2009, PostgreSQL Global Development Group
 *
 * IDENTIFICATION
 *	  src/backend/utils/misc/guc_gp.c
 *
 *--------------------------------------------------------------------
 */
#include "postgres.h"

#include "access/reloptions.h"
H
Heikki Linnakangas 已提交
19
#include "access/transam.h"
20 21 22 23 24 25 26 27 28 29 30 31
#include "access/url.h"
#include "access/xlog_internal.h"
#include "cdb/cdbappendonlyam.h"
#include "cdb/cdbdisp.h"
#include "cdb/cdbfilerep.h"
#include "cdb/cdbsreh.h"
#include "cdb/cdbvars.h"
#include "cdb/memquota.h"
#include "commands/vacuum.h"
#include "miscadmin.h"
#include "libpq/password_hash.h"
#include "optimizer/planmain.h"
32
#include "optimizer/cost.h"
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
#include "pgstat.h"
#include "postmaster/syslogger.h"
#include "replication/walsender.h"
#include "storage/bfz.h"
#include "storage/proc.h"
#include "utils/guc_tables.h"
#include "utils/inval.h"
#include "utils/resscheduler.h"
#include "utils/vmem_tracker.h"

#ifdef USE_CONNECTEMC
#include "emcconnect/api.h"
#endif

/*
D
Daniel Gustafsson 已提交
48
 * These constants are copied from guc.c. They should not bitrot when we
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
 * merge guc.c with upstream, as these are natural constants that never
 * change. guc.c might acquire more of these, though. In that case, we'll
 * just copy the new ones too, as needed.
 */
#define KB_PER_MB (1024)
#define KB_PER_GB (1024*1024)

#define MS_PER_S 1000
#define S_PER_MIN 60
#define MS_PER_MIN (1000 * 60)
#define MIN_PER_H 60
#define S_PER_H (60 * 60)
#define MS_PER_H (1000 * 60 * 60)
#define MIN_PER_D (60 * 24)
#define S_PER_D (60 * 60 * 24)
#define MS_PER_D (1000 * 60 * 60 * 24)

/*
 * Assign/Show hook functions defined in this module
 */
static const char *assign_gp_workfile_compress_algorithm(const char *newval, bool doit, GucSource source);
static const char *assign_gp_workfile_type_hashjoin(const char *newval, bool doit, GucSource source);
static const char *assign_debug_persistent_print_level(const char *newval,
									bool doit, GucSource source);
static const char *assign_debug_persistent_recovery_print_level(const char *newval,
											 bool doit, GucSource source);
static const char *assign_debug_persistent_store_print_level(const char *newval,
										  bool doit, GucSource source);
static const char *assign_debug_database_command_print_level(const char *newval,
										  bool doit, GucSource source);
static const char *assign_optimizer_log_failure(const char *newval,
							 bool doit, GucSource source);
static const char *assign_optimizer_minidump(const char *newval,
						  bool doit, GucSource source);
static bool assign_optimizer(bool newval, bool doit, GucSource source);
84
static bool assign_codegen(bool newval, bool doit, GucSource source);
85 86
static const char *assign_codegen_optimization_level(const char *newval,
                                                     bool doit, GucSource source);
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158
static const char *assign_optimizer_cost_model(const char *newval,
							bool doit, GucSource source);
static const char *assign_gp_workfile_caching_loglevel(const char *newval,
									bool doit, GucSource source);
static const char *assign_gp_sessionstate_loglevel(const char *newval,
								bool doit, GucSource source);
static const char *assign_time_slice_report_level(const char *newval, bool doit,
							   GucSource source);
static const char *assign_deadlock_hazard_report_level(const char *newval, bool doit,
									GucSource source);
static const char *assign_system_cache_flush_force(const char *newval, bool doit,
								GucSource source);
static const char *assign_gp_idf_deduplicate(const char *newval, bool doit,
						  GucSource source);
static const char *assign_explain_memory_verbosity(const char *newval, bool doit, GucSource source);
static bool assign_dispatch_log_stats(bool newval, bool doit, GucSource source);

static const char *assign_debug_dtm_action(const char *newval,
						bool doit, GucSource source);
static const char *assign_debug_dtm_action_target(const char *newval,
							   bool doit, GucSource source);
static const char *assign_debug_dtm_action_protocol(const char *newval,
								 bool doit, GucSource source);
static const char *assign_gp_log_format(const char *value, bool doit,
					 GucSource source);

#ifdef USE_CONNECTEMC
static const char *assign_connectemc_mode(const char *newval, bool doit, GucSource source);
#endif

/* Helper function for guc setter */
extern const char *gpvars_assign_gp_resqueue_priority_default_value(const char *newval,
												 bool doit,
								   GucSource source __attribute__((unused)));

static const char *assign_password_hash_algorithm(const char *newval,
							   bool doit, GucSource source);
static const char *assign_gp_default_storage_options(
							const char *newval, bool doit, GucSource source);

extern bool enable_partition_rules;

/* GUC lists for gp_guc_list_show().  (List of struct config_generic) */
List	   *gp_guc_list_for_explain;
List	   *gp_guc_list_for_no_plan;

char	   *Debug_dtm_action_sql_command_tag;
char	   *Debug_dtm_action_str;
char	   *Debug_dtm_action_target_str;
char	   *Debug_dtm_action_protocol_str;

bool		Debug_print_full_dtm = false;
bool		Debug_print_snapshot_dtm = false;
bool		Debug_print_qd_mirroring = false;
bool		Debug_print_semaphore_detail = false;
bool		Debug_disable_distributed_snapshot = false;
bool		Debug_abort_after_distributed_prepared = false;
bool		Debug_abort_after_segment_prepared = false;
bool		Debug_print_server_processes = false;
bool		Debug_print_control_checkpoints = false;
bool		Debug_appendonly_print_insert = false;
bool		Debug_appendonly_print_insert_tuple = false;
bool		Debug_appendonly_print_scan = false;
bool		Debug_appendonly_print_scan_tuple = false;
bool		Debug_appendonly_print_delete = false;
bool		Debug_appendonly_print_storage_headers = false;
bool		Debug_appendonly_print_verify_write_block = false;
bool		Debug_appendonly_use_no_toast = false;
bool		Debug_appendonly_print_blockdirectory = false;
bool		Debug_appendonly_print_read_block = false;
bool		Debug_appendonly_print_append_block = false;
bool		Debug_appendonly_print_segfile_choice = false;
159
bool        test_AppendOnlyHash_eviction_vs_just_marking_not_inuse = false;
160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213
int			Debug_appendonly_bad_header_print_level = ERROR;
bool		Debug_appendonly_print_datumstream = false;
bool		Debug_appendonly_print_visimap = false;
bool		Debug_appendonly_print_compaction = false;
bool		gp_crash_recovery_abort_suppress_fatal = false;
bool		gp_persistent_statechange_suppress_error = false;
bool		Debug_bitmap_print_insert = false;
bool		Test_appendonly_override = false;
bool		Test_print_direct_dispatch_info = false;
bool		gp_test_orientation_override = false;
bool		gp_permit_persistent_metadata_update = false;
bool		gp_permit_relation_node_change = false;
int			Test_compresslevel_override = 0;
int			Test_blocksize_override = 0;
int			Test_safefswritesize_override = 0;
bool		Master_mirroring_administrator_disable = false;
int			gp_max_local_distributed_cache = 1024;
bool		gp_appendonly_verify_block_checksums = true;
bool		gp_appendonly_verify_write_block = false;
bool		gp_appendonly_verify_eof = true;
bool		gp_appendonly_compaction = true;
int			gp_appendonly_compaction_threshold = 0;
bool		gp_heap_require_relhasoids_match = true;
bool		Debug_appendonly_rezero_quicklz_compress_scratch = false;
bool		Debug_appendonly_rezero_quicklz_decompress_scratch = false;
bool		Debug_appendonly_guard_end_quicklz_scratch = false;
bool		gp_local_distributed_cache_stats = false;
bool		Debug_xlog_insert_print = false;
bool		debug_xlog_record_read = false;
bool		Debug_persistent_print = false;
int			Debug_persistent_print_level = LOG;
bool		Debug_persistent_recovery_print = true;
int			Debug_persistent_recovery_print_level = LOG;
bool		Disable_persistent_recovery_logging = false;
bool		Debug_persistent_store_print = false;
int			Debug_persistent_store_print_level = LOG;
bool		Debug_persistent_bootstrap_print = false;
bool		persistent_integrity_checks = true;
bool		debug_persistent_ptcat_verification = false;
bool		debug_print_persistent_checks = false;
bool		Debug_bulk_load_bypass_wal = true;
bool		Debug_persistent_appendonly_commit_count_print = false;
bool		Debug_cancel_print = false;
bool		Debug_datumstream_write_print_small_varlena_info = false;
bool		Debug_datumstream_write_print_large_varlena_info = false;
bool		Debug_datumstream_read_check_large_varlena_integrity = false;
bool		Debug_datumstream_block_read_check_integrity = false;
bool		Debug_datumstream_block_write_check_integrity = false;
bool		Debug_datumstream_read_print_varlena_info = false;
bool		Debug_datumstream_write_use_small_initial_buffers = false;
bool		gp_temporary_files_filespace_repair = false;
bool		gp_create_table_random_default_distribution = true;
bool		gp_allow_non_uniform_partitioning_ddl = true;
bool		gp_enable_exchange_default_partition = false;
214
int			dtx_phase2_retry_count = 0;
215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245

bool		log_dispatch_stats = false;

int			explain_memory_verbosity = 0;
char	   *memory_profiler_run_id = "none";
char	   *memory_profiler_dataset_id = "none";
char	   *memory_profiler_query_id = "none";
int			memory_profiler_dataset_size = 0;
bool		gp_dump_memory_usage = FALSE;


#define VERIFY_CHECKPOINT_INTERVAL_DEFAULT 180
int			verify_checkpoint_interval =
VERIFY_CHECKPOINT_INTERVAL_DEFAULT;

bool		rle_type_compression_stats = false;

bool		Debug_database_command_print = false;
int			Debug_database_command_print_level = LOG;
#define GP_MAX_DATABASES_DEFAULT 16
int			gp_max_databases = GP_MAX_DATABASES_DEFAULT;
#define GP_MAX_TABLESPACES_DEFAULT 16
int			gp_max_tablespaces = GP_MAX_TABLESPACES_DEFAULT;
#define GP_MAX_FILESPACES_DEFAULT 8
int			gp_max_filespaces = GP_MAX_FILESPACES_DEFAULT;
bool		gp_initdb_mirrored = false;
bool		gp_before_persistence_work = false;
bool		gp_before_filespace_setup = false;
bool		gp_startup_integrity_checks = true;
bool		gp_change_tracking = true;
bool		gp_persistent_repair_global_sequence = false;
246
bool		gp_validate_pt_info_relcache = false;
247 248 249 250 251 252 253 254 255 256
bool		Debug_print_xlog_relation_change_info = false;
bool		Debug_print_xlog_relation_change_info_skip_issues_only = false;
bool		Debug_print_xlog_relation_change_info_backtrace_skip_issues = false;

bool		Debug_filerep_crc_on = true;
bool		Debug_filerep_print = false;
bool		Debug_filerep_gcov = false;
bool		Debug_filerep_config_print = false;
bool		Debug_filerep_memory_log_flush = false;
bool		filerep_mirrorvalidation_during_resync = false;
257
bool		log_filerep_to_syslogger = false;
258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336

/* WAL based replication debug GUCs */
bool		debug_walrepl_snd = false;
bool		debug_walrepl_syncrep = false;
bool		debug_walrepl_rcv = false;
bool		debug_basebackup = false;

/* Latch mechanism debug GUCs */
bool		debug_latch = false;

bool		gp_crash_recovery_suppress_ao_eof = false;
bool		gp_keep_all_xlog = false;
int			keep_wal_segments = 0;
int			ddboost_buf_size = 512 * 1024;

#define DEBUG_DTM_ACTION_PRIMARY_DEFAULT true
bool		Debug_dtm_action_primary = DEBUG_DTM_ACTION_PRIMARY_DEFAULT;

bool		gp_log_optimization_time = false;

int			Debug_delay_prepare_broadcast_ms = 0;
int			Debug_delay_commit_broadcast_ms = 0;
int			Debug_delay_abort_broadcast_ms = 0;

int			Debug_dtm_action = DEBUG_DTM_ACTION_NONE;

#define DEBUG_DTM_ACTION_TARGET_DEFAULT DEBUG_DTM_ACTION_TARGET_NONE

int			Debug_dtm_action_target = DEBUG_DTM_ACTION_TARGET_DEFAULT;

#define DEBUG_DTM_ACTION_PROTOCOL_DEFAULT DTX_PROTOCOL_COMMAND_COMMIT_PREPARED

int			Debug_dtm_action_protocol = DEBUG_DTM_ACTION_PROTOCOL_DEFAULT;

#define DEBUG_DTM_ACTION_SEGMENT_DEFAULT 1
#define DEBUG_DTM_ACTION_NESTINGLEVEL_DEFAULT 0

int			Debug_dtm_action_segment = DEBUG_DTM_ACTION_SEGMENT_DEFAULT;
int			Debug_dtm_action_nestinglevel = DEBUG_DTM_ACTION_NESTINGLEVEL_DEFAULT;

/* Enable check for compatibility of encoding and locale in createdb */
bool		gp_encoding_check_locale_compatibility;

int			gp_connection_send_timeout;

int			gp_filerep_tcp_keepalives_idle;
int			gp_filerep_tcp_keepalives_interval;
int			gp_filerep_tcp_keepalives_count;

int			WalSendClientTimeout = 30000;		/* 30 seconds. */

char	   *data_directory;

char	   *gp_email_smtp_server;
char	   *gp_email_smtp_userid;
char	   *gp_email_smtp_password;
char	   *gp_email_from;
char	   *gp_email_to;
int			gp_email_connect_timeout;
int			gp_email_connect_failures;
int			gp_email_connect_avoid_duration;

#if USE_SNMP
char	   *gp_snmp_community;
char	   *gp_snmp_monitor_address;
char	   *gp_snmp_use_inform_or_trap;
char	   *gp_snmp_debug_log;
#endif

char	   *gp_connectemc_mode;
#ifdef USE_CONNECTEMC
EmcConnectModeType_t gp_emcconnect_transport;
#endif

static char *gp_log_gang_str;
static char *gp_log_fts_str;
static char *gp_log_interconnect_str;
static char *gp_interconnect_type_str;
static char *gp_interconnect_fc_method_str;
337
static char *gp_resource_manager_str;
338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394

/*
 * These variables are all dummies that don't do anything, except in some
 * cases provide the value for SHOW to display.  The real state is elsewhere
 * and is kept in sync by assign_hooks.
 */
static char *gp_workfile_compress_algorithm_str;
static char *gp_workfile_type_hashjoin_str;
static char *optimizer_log_failure_str;
static char *optimizer_minidump_str;
static char *optimizer_cost_model_str;
static char *Debug_persistent_print_level_str;
static char *Debug_persistent_recovery_print_level_str;
static char *Debug_persistent_store_print_level_str;
static char *Debug_database_command_print_level_str;
static char *gp_log_format_string;
static char *gp_workfile_caching_loglevel_str;
static char *gp_sessionstate_loglevel_str;
static char *explain_memory_verbosity_str;

/* Backoff-related GUCs */
bool		gp_enable_resqueue_priority;
int			gp_resqueue_priority_local_interval;
int			gp_resqueue_priority_sweeper_interval;
int			gp_resqueue_priority_inactivity_timeout;
int			gp_resqueue_priority_grouping_timeout;
double		gp_resqueue_priority_cpucores_per_segment;
char	   *gp_resqueue_priority_default_value;
bool		gp_debug_resqueue_priority = false;

/* Perfmon segment GUCs */
int			gp_perfmon_segment_interval;
static char *gpperfmon_log_alert_level_str;

/* Perfmon debug GUC */
bool		gp_perfmon_print_packet_info;

/* Simulator of Exceptions (SimEx) GUCs */
bool		gp_simex_init;
bool		gp_simex_run;
int			gp_simex_class;
double		gp_simex_rand;

/* time slice enforcement */
bool		gp_test_time_slice;
int			gp_test_time_slice_interval;
int			gp_test_time_slice_report_level = ERROR;
static char *gp_test_time_slice_report_level_str;

/* database-lightweight lock hazard detection */
bool		gp_test_deadlock_hazard;
int			gp_test_deadlock_hazard_report_level = ERROR;
static char *gp_test_deadlock_hazard_report_level_str;

/* query cancellation GUC */
bool		gp_cancel_query_print_log;
int			gp_cancel_query_delay_time;
395
bool		vmem_process_interrupt = false;
396 397 398 399 400 401 402 403 404

/* partitioning GUC */
bool		gp_partitioning_dynamic_selection_log;
int			gp_max_partition_level;

/* Upgrade & maintenance GUCs */
bool		gp_maintenance_mode;
bool		gp_maintenance_conn;
bool		allow_segment_DML;
405
bool		gp_allow_rename_relation_without_lock = false;
406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460

/* ignore EXCLUDE clauses in window spec for backwards compatibility */
bool		gp_ignore_window_exclude = false;

/* Hadoop Integration GUCs */
char	   *gp_hadoop_connector_jardir;
char	   *gp_hadoop_connector_version = "";	/* old GUC; now it's a global
												 * var. */
char	   *gp_hadoop_target_version;
char	   *gp_hadoop_home;

/* Time based authentication GUC */
char	   *gp_auth_time_override_str = NULL;

/* Password hashing */
char	   *password_hash_algorithm_str = "MD5";
PasswdHashAlg password_hash_algorithm = PASSWORD_HASH_MD5;

/* system cache invalidation mode*/
int			gp_test_system_cache_flush_force = SysCacheFlushForce_Off;
static char *gp_test_system_cache_flush_force_str;

/* include file/line information to stack traces */
bool		gp_log_stack_trace_lines;


/*
 * If set to true, we will silently insert into the correct leaf
 * part even if the user specifies a wrong leaf part as a insert target
 */
bool		dml_ignore_target_partition_check = false;

char	   *gp_idf_deduplicate_str;

bool		fts_diskio_check = false;

/* Planner gucs */
bool		gp_enable_hashjoin_size_heuristic = false;
bool		gp_enable_fallback_plan = true;
bool		gp_enable_predicate_propagation = false;
bool		gp_enable_multiphase_agg = true;
bool		gp_enable_preunique = TRUE;
bool		gp_eager_preunique = FALSE;
bool		gp_enable_sequential_window_plans = FALSE;
bool		gp_hashagg_streambottom = true;
bool		gp_enable_agg_distinct = true;
bool		gp_enable_dqa_pruning = true;
bool		gp_eager_dqa_pruning = FALSE;
bool		gp_eager_one_phase_agg = FALSE;
bool		gp_eager_two_phase_agg = FALSE;
bool		gp_enable_groupext_distinct_pruning = true;
bool		gp_enable_groupext_distinct_gather = true;
bool		gp_dynamic_partition_pruning = true;
bool		gp_log_dynamic_partition_pruning = false;
bool		gp_cte_sharing = false;
461
bool		gp_enable_relsize_collection = false;
462 463 464 465 466

/* ORCA related gucs */
bool		optimizer_control = true;
bool		optimizer;
bool		optimizer_log;
467
bool		optimizer_trace_fallback;
468 469 470 471 472 473
bool		optimizer_partition_selection_log;
bool		optimizer_minidump;
int			optimizer_cost_model;
bool		optimizer_print_query;
bool		optimizer_print_plan;
bool		optimizer_print_xform;
474
bool		optimizer_metadata_caching;
475
int		optimizer_mdcache_size;
476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523
bool		optimizer_disable_xform_result_printing;
bool		optimizer_print_memo_after_exploration;
bool		optimizer_print_memo_after_implementation;
bool		optimizer_print_memo_after_optimization;
bool		optimizer_print_job_scheduler;
bool		optimizer_print_expression_properties;
bool		optimizer_print_group_properties;
bool		optimizer_print_optimization_context;
bool		optimizer_print_optimization_stats;
bool		optimizer_local;
int			optimizer_retries;
/* array of xforms disable flags */
bool		optimizer_xforms[OPTIMIZER_XFORMS_COUNT] = {[0 ... OPTIMIZER_XFORMS_COUNT - 1] = false};
char	   *optimizer_search_strategy_path = NULL;
char	   *gp_idf_deduplicate_str;
bool		optimizer_extract_dxl_stats;
bool		optimizer_extract_dxl_stats_all_nodes;
bool		optimizer_disable_missing_stats_collection;
bool		optimizer_dpe_stats;
bool		optimizer_enable_indexjoin;
bool		optimizer_enable_motions_masteronly_queries;
bool		optimizer_enable_motions;
bool		optimizer_enable_motion_broadcast;
bool		optimizer_enable_motion_gather;
bool		optimizer_enable_motion_redistribute;
bool		optimizer_enable_sort;
bool		optimizer_enable_materialize;
bool		optimizer_enable_partition_propagation;
bool		optimizer_enable_partition_selection;
bool		optimizer_enable_outerjoin_rewrite;
bool		optimizer_enable_space_pruning;
bool		optimizer_prefer_multistage_agg;
bool		optimizer_enable_multiple_distinct_aggs;
bool		optimizer_prefer_expanded_distinct_aggs;
bool		optimizer_prune_computed_columns;
bool		optimizer_push_requirements_from_consumer_to_producer;
bool		optimizer_direct_dispatch;
bool		optimizer_enable_hashjoin_redistribute_broadcast_children;
bool		optimizer_enable_broadcast_nestloop_outer_child;
bool		optimizer_enforce_subplans;
bool		optimizer_enable_assert_maxonerow;
bool		optimizer_enumerate_plans;
bool		optimizer_sample_plans;
int			optimizer_plan_id;
int			optimizer_samples_number;
int			optimizer_log_failure;
double		optimizer_cost_threshold;
double		optimizer_nestloop_factor;
524
double		optimizer_sort_factor;
525 526 527 528 529 530
bool		optimizer_cte_inlining;
int			optimizer_cte_inlining_bound;
double		optimizer_damping_factor_filter;
double		optimizer_damping_factor_join;
double		optimizer_damping_factor_groupby;
int			optimizer_segments;
531
int			optimizer_join_arity_for_associativity_commutativity;
532
int			optimizer_penalize_broadcast_threshold;
533
int         optimizer_array_expansion_threshold;
534
int         optimizer_join_order_threshold;
535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551
bool		optimizer_analyze_root_partition;
bool		optimizer_analyze_midlevel_partition;
bool		optimizer_enable_constant_expression_evaluation;
bool		optimizer_use_external_constant_expression_evaluation_for_ints;
bool		optimizer_enable_bitmapscan;
bool		optimizer_enable_outerjoin_to_unionall_rewrite;
bool		optimizer_apply_left_outer_to_union_all_disregarding_stats;
bool		optimizer_enable_ctas;
bool		optimizer_remove_order_below_dml;
bool		optimizer_static_partition_selection;
bool		optimizer_enable_partial_index;
bool		optimizer_dml_triggers;
bool		optimizer_dml_constraints;
bool		optimizer_enable_master_only_queries;
bool		optimizer_multilevel_partitioning;
bool		optimizer_enable_derive_stats_all_groups;
bool		optimizer_explain_show_status;
552
bool		optimizer_prefer_scalar_dqa_multistage_agg;
553
bool 		optimizer_parallel_union;
554
bool		optimizer_array_constraints;
555

556 557 558
/**
 * GUCs related to code generation.
 **/
559
bool		init_codegen;
560
bool		codegen;
561
bool		codegen_validate_functions;
562 563 564 565
bool		codegen_exec_variable_list;
bool		codegen_slot_getattr;
bool		codegen_exec_eval_expr;
bool		codegen_advance_aggregate;
566 567
int		codegen_varlen_tolerance;
int		codegen_optimization_level;
568
static char 	*codegen_optimization_level_str = NULL;
569

570 571 572
/* System Information */
static int	gp_server_version_num;
static char *gp_server_version_string;
573

574 575 576 577 578 579 580 581 582
/* Security */
bool		gp_reject_internal_tcp_conn = true;

/*
 * Default storage options GUC.  Value is comma-separated name=value
 * pairs.  E.g. "appendonly=true,orientation=column"
 */
char	   *gp_default_storage_options = NULL;

583 584
int			writable_external_table_bufsize = 64;

585 586 587
IndexCheckType gp_indexcheck_insert = INDEX_CHECK_NONE;
IndexCheckType gp_indexcheck_vacuum = INDEX_CHECK_NONE;

588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618
struct config_bool ConfigureNamesBool_gp[] =
{
	{
		{"maintenance_mode", PGC_POSTMASTER, CUSTOM_OPTIONS,
			gettext_noop("Maintenance Mode"),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&gp_maintenance_mode,
		false, NULL, NULL
	},

	{
		{"gp_maintenance_conn", PGC_BACKEND, CUSTOM_OPTIONS,
			gettext_noop("Maintenance Connection"),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&gp_maintenance_conn,
		false, NULL, NULL
	},

	{
		{"allow_segment_DML", PGC_USERSET, CUSTOM_OPTIONS,
			gettext_noop("Allow DML on segments"),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&allow_segment_DML,
		false, NULL, NULL
	},
619 620 621 622 623 624 625 626 627
	{
		{"gp_allow_rename_relation_without_lock", PGC_USERSET, CUSTOM_OPTIONS,
			gettext_noop("Allow ALTER TABLE RENAME without AccessExclusiveLock"),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&gp_allow_rename_relation_without_lock,
		false, NULL, NULL
	},
628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545
	{
		{"enable_groupagg", PGC_USERSET, QUERY_TUNING_METHOD,
			gettext_noop("Enables the planner's use of grouping aggregation plans."),
			NULL
		},
		&enable_groupagg,
		true, NULL, NULL
	},
	{
		{"gp_enable_hashjoin_size_heuristic", PGC_USERSET, QUERY_TUNING_METHOD,
			gettext_noop("In hash join plans, the smaller of the two inputs "
						 "(as estimated) is used to build the hash table."),
			gettext_noop("If false, either input could be used to build the "
					  "hash table; the choice depends on the estimated hash "
						 "join cost, which the planner computes for both "
						 "alternatives.  Has no effect on outer or adaptive "
						 "joins."),
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&gp_enable_hashjoin_size_heuristic,
		false, NULL, NULL
	},
	{
		{"gp_enable_fallback_plan", PGC_USERSET, QUERY_TUNING_METHOD,
			gettext_noop("Plan types which are not enabled may be used when a "
						 "query would be infeasible without them."),
			gettext_noop("If false, planner rejects queries that cannot be "
						 "satisfied using only the enabled plan types.")
		},
		&gp_enable_fallback_plan,
		true, NULL, NULL
	},
	{
		{"gp_enable_direct_dispatch", PGC_USERSET, QUERY_TUNING_METHOD,
			gettext_noop("Enable dispatch for single-row-insert targetted mirror-pairs."),
			gettext_noop("Don't involve the whole cluster if it isn't needed.")
		},
		&gp_enable_direct_dispatch,
		true, NULL, NULL
	},
	{
		{"gp_enable_predicate_propagation", PGC_USERSET, QUERY_TUNING_OTHER,
			gettext_noop("When two expressions are equivalent (such as with "
					  "equijoined keys) then the planner applies predicates "
						 "on one expression to the other expression."),
			gettext_noop("If false, planner does not copy predicates.")
		},
		&gp_enable_predicate_propagation,
		true, NULL, NULL
	},
	{
		{"gp_workfile_checksumming", PGC_USERSET, QUERY_TUNING_OTHER,
			gettext_noop("Enable checksumming on the executor work files in order to "
				"catch possible faulty writes caused by your disk drivers."),
			NULL,
			GUC_GPDB_ADDOPT
		},
		&gp_workfile_checksumming,
		true, NULL, NULL
	},
	{
		{"force_bitmap_table_scan", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Forces bitmap table scan instead of bitmap heap/ao/aoco scan."),
			NULL,
			GUC_GPDB_ADDOPT | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&force_bitmap_table_scan,
		false, NULL, NULL
	},
	{
		{"gp_workfile_faultinject", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Fault inject a torn page to an executor workfile."),
			gettext_noop("Used to simulate a failure and test workfile checksumming."),
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE | GUC_GPDB_ADDOPT
		},
		&gp_workfile_faultinject,
		false, NULL, NULL
	},
	{
		{"memory_protect_buffer_pool", PGC_POSTMASTER, DEVELOPER_OPTIONS,
			gettext_noop("Enables memory protection of the buffer pool"),
			gettext_noop("Turn on memory protection of the buffer pool "
					"to detect invalid accesses to the buffer pool memory."),
			GUC_NOT_IN_SAMPLE | GUC_NO_SHOW_ALL
		},
		&memory_protect_buffer_pool, false, NULL, NULL
	},
	{
		{"debug_print_prelim_plan", PGC_USERSET, LOGGING_WHAT,
			gettext_noop("Prints the preliminary execution plan to server log."),
			NULL
		},
		&Debug_print_prelim_plan,
		false, NULL, NULL
	},
	{
		{"debug_print_slice_table", PGC_USERSET, LOGGING_WHAT,
			gettext_noop("Prints the slice table to server log."),
			NULL
		},
		&Debug_print_slice_table,
		false, NULL, NULL
	},
	{
		{"log_dispatch_stats", PGC_SUSET, STATS_MONITORING,
			gettext_noop("Writes dispatcher performance statistics to the server log."),
			NULL,
			GUC_GPDB_ADDOPT
		},
		&log_dispatch_stats,
		false, assign_dispatch_log_stats, NULL
	},

	{
		/* MPP-9772, MPP-9773: remove support for CREATE INDEX CONCURRENTLY */
		{"gp_create_index_concurrently", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Allow concurrent index creation."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&gp_create_index_concurrently,
		false, NULL, NULL
	},

	{
		{"gp_enable_multiphase_agg", PGC_USERSET, QUERY_TUNING_METHOD,
			gettext_noop("Enables the planner's use of two- or three-stage parallel aggregation plans."),
			gettext_noop("Allows partial aggregation before motion.")
		},
		&gp_enable_multiphase_agg,
		true, NULL, NULL
	},

	{
		{"gp_enable_hash_partitioned_tables", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Enable hash partitioned tables."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&gp_enable_hash_partitioned_tables,
		false, NULL, NULL
	},

	{
		{"gp_setwith_alter_storage", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Let SET WITH alter the storage options."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&gp_setwith_alter_storage,
		false, NULL, NULL
	},

	{
		{"gp_enable_preunique", PGC_USERSET, QUERY_TUNING_METHOD,
			gettext_noop("Enable 2-phase duplicate removal."),
			gettext_noop("If true, planner may choose to remove duplicates in "
						 "two phases--before and after redistribution.")
		},
		&gp_enable_preunique,
		true, NULL, NULL
	},

	{
		{"gp_eager_preunique", PGC_USERSET, QUERY_TUNING_METHOD,
			gettext_noop("Experimental feature: 2-phase duplicate removal - cost override."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&gp_eager_preunique,
		false, NULL, NULL
	},

	{
		{"gp_enable_sequential_window_plans", PGC_USERSET, QUERY_TUNING_METHOD,
			gettext_noop("Experimental feature: Enable non-parallel window plans."),
			gettext_noop("The planner will evaluate window functions associated with separate "
			   "window specifications sequentially rather that in parallel.")
		},
		&gp_enable_sequential_window_plans,
		true, NULL, NULL
	},

	{
		{"gp_enable_agg_distinct", PGC_USERSET, QUERY_TUNING_METHOD,
			gettext_noop("Enable 2-phase aggregation to compute a single distinct-qualified aggregate."),
			NULL,
		},
		&gp_enable_agg_distinct,
		true, NULL, NULL
	},

	{
		{"gp_enable_agg_distinct_pruning", PGC_USERSET, QUERY_TUNING_METHOD,
			gettext_noop("Enable 3-phase aggregation and join to compute distinct-qualified aggregates."),
			NULL,
		},
		&gp_enable_dqa_pruning,
		true, NULL, NULL
	},

	{
		{"gp_enable_groupext_distinct_pruning", PGC_USERSET, QUERY_TUNING_METHOD,
			gettext_noop("Enable 3-phase aggregation and join to compute distinct-qualified aggregates"
						 " on grouping extention queries."),
			NULL,
		},
		&gp_enable_groupext_distinct_pruning,
		true, NULL, NULL
	},

	{
		{"gp_enable_groupext_distinct_gather", PGC_USERSET, QUERY_TUNING_METHOD,
			gettext_noop("Enable gathering data to a single node to compute distinct-qualified aggregates"
						 " on grouping extention queries."),
			NULL,
		},
		&gp_enable_groupext_distinct_gather,
		true, NULL, NULL
	},

	{
		{"gp_eager_agg_distinct_pruning", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Prefer 3-phase aggregation [and join] to compute distinct-qualified aggregates."),
			gettext_noop("The planner will prefer to use 3-phase aggregation and join to compute "
				"distinct-qualified aggregates whenever enabled and possible"
						 "regardless of cost estimates."),
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&gp_eager_dqa_pruning,
		false, NULL, NULL
	},

	{
		{"gp_eager_one_phase_agg", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Prefer 1-phase aggregation."),
			gettext_noop("The planner will prefer to use 1-phase aggregation whenever possible"
						 "regardless of cost estimates."),
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&gp_eager_one_phase_agg,
		false, NULL, NULL
	},

	{
		{"gp_eager_two_phase_agg", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Prefer 2-phase aggregation."),
			gettext_noop("The planner will prefer to use 2-phase aggregation whenever"
					   "enabled and possible regardless of cost estimates."),
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&gp_eager_two_phase_agg,
		false, NULL, NULL
	},

	{
		{"gp_dev_notice_agg_cost", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Trace aggregate costing decisions as NOTICEs."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&gp_dev_notice_agg_cost,
		false, NULL, NULL
	},

	{
		{"gp_enable_explain_allstat", PGC_USERSET, CLIENT_CONN_OTHER,
			gettext_noop("Experimental feature: dump stats for all segments in EXPLAIN ANALYZE."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&gp_enable_explain_allstat,
		false, NULL, NULL
	},

	{
		{"gp_dump_memory_usage", PGC_USERSET, CLIENT_CONN_OTHER,
			gettext_noop("Save memory usage in each segment."),
			NULL,
			GUC_GPDB_ADDOPT | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&gp_dump_memory_usage,
		false, NULL, NULL
	},

	{
		{"gp_enable_sort_limit", PGC_USERSET, QUERY_TUNING_METHOD,
			gettext_noop("Enable LIMIT operation to be performed while sorting."),
			gettext_noop("Sort more efficiently when plan requires the first <n> rows at most.")
		},
		&gp_enable_sort_limit,
		true, NULL, NULL
	},

	{
		{"gp_enable_sort_distinct", PGC_USERSET, QUERY_TUNING_METHOD,
			gettext_noop("Enable duplicate removal to be performed while sorting."),
			gettext_noop("Reduces data handling when plan calls for removing duplicates from sorted rows.")
		},
		&gp_enable_sort_distinct,
		true, NULL, NULL
	},

	{
		{"gp_parquet_insert_sort", PGC_USERSET, RESOURCES_MEM,
			gettext_noop("Enable sorting of tuples during insertion in parquet partitioned tables."),
			gettext_noop("Reduces memory usage required for insertion by keeping on part open at a time"),
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE | GUC_GPDB_ADDOPT

		},
		&gp_parquet_insert_sort,
		true, NULL, NULL
	},

	{
		{"gp_enable_mk_sort", PGC_USERSET, QUERY_TUNING_METHOD,
			gettext_noop("Enable multi-key sort."),
			gettext_noop("A faster sort."),
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE | GUC_GPDB_ADDOPT

		},
		&gp_enable_mk_sort,
		true, NULL, NULL
	},

	{
		{"gp_enable_motion_mk_sort", PGC_USERSET, QUERY_TUNING_METHOD,
			gettext_noop("Enable multi-key sort in sorted motion recv."),
			gettext_noop("A faster sort for recv motion"),
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE | GUC_GPDB_ADDOPT

		},
		&gp_enable_motion_mk_sort,
		true, NULL, NULL
	},


#ifdef USE_ASSERT_CHECKING
	{
		{"gp_mk_sort_check", PGC_USERSET, QUERY_TUNING_METHOD,
			gettext_noop("Extensive check mk_sort"),
			gettext_noop("Expensive debug checking"),
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE | GUC_GPDB_ADDOPT
		},
		&gp_mk_sort_check,
		false, NULL, NULL
	},
#endif

	{
		{"gp_hashagg_streambottom", PGC_USERSET, QUERY_TUNING_METHOD,
			gettext_noop("Stream the bottom stage of two stage hashagg"),
			gettext_noop("Avoid spilling at the bottom stage of two stage hashagg"),
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&gp_hashagg_streambottom,
		true, NULL, NULL
	},

	{
		{"gp_enable_motion_deadlock_sanity", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Enable verbose check at planning time."),
			NULL,
			GUC_NO_RESET_ALL | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&gp_enable_motion_deadlock_sanity,
		false, NULL, NULL
	},

	{
		{"gp_adjust_selectivity_for_outerjoins", PGC_USERSET, QUERY_TUNING_METHOD,
			gettext_noop("Adjust selectivity of null tests over outer joins."),
			NULL,
			GUC_NOT_IN_SAMPLE
		},
		&gp_adjust_selectivity_for_outerjoins,
		true, NULL, NULL
	},

	{
		{"gp_selectivity_damping_for_scans", PGC_USERSET, QUERY_TUNING_METHOD,
			gettext_noop("Damping of selectivities for clauses over the same base relation."),
			NULL,
			GUC_NOT_IN_SAMPLE | GUC_NO_SHOW_ALL
		},
		&gp_selectivity_damping_for_scans,
		true, NULL, NULL
	},

	{
		{"gp_selectivity_damping_for_joins", PGC_USERSET, QUERY_TUNING_METHOD,
			gettext_noop("Damping of selectivities in join clauses."),
			NULL,
			GUC_NOT_IN_SAMPLE | GUC_NO_SHOW_ALL
		},
		&gp_selectivity_damping_for_joins,
		false, NULL, NULL
	},

	{
		{"gp_selectivity_damping_sigsort", PGC_USERSET, QUERY_TUNING_METHOD,
			gettext_noop("Sort selectivities by ascending significance, i.e. smallest first"),
			NULL,
			GUC_NOT_IN_SAMPLE | GUC_NO_SHOW_ALL
		},
		&gp_selectivity_damping_sigsort,
		true, NULL, NULL
	},

	{
		{"gp_crash_recovery_abort_suppress_fatal", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Warning about crash recovery abort transaction issue"),
			NULL,
			GUC_NOT_IN_SAMPLE | GUC_NO_SHOW_ALL
		},
		&gp_crash_recovery_abort_suppress_fatal,
		false, NULL, NULL
	},
	{
		{"gp_persistent_statechange_suppress_error", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Warning about persistent state-change issue"),
			NULL,
			GUC_NOT_IN_SAMPLE | GUC_NO_SHOW_ALL
		},
		&gp_persistent_statechange_suppress_error,
		false, NULL, NULL
	},
	{
		{"gp_select_invisible", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Use dummy snapshot for MVCC visibility calculation."),
			NULL,
			GUC_NOT_IN_SAMPLE | GUC_NO_SHOW_ALL | GUC_GPDB_ADDOPT
		},
		&gp_select_invisible,
		false, NULL, NULL
	},

	{
		{"gp_enable_slow_writer_testmode", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Slow down writer gangs -- to facilitate race-condition testing."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&gp_enable_slow_writer_testmode,
		false, NULL, NULL
	},

	{
		{"gp_fts_probe_pause", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Stop active probes."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&gp_fts_probe_pause,
		false, gpvars_assign_gp_fts_probe_pause, NULL
	},

	{
		{"gp_fts_transition_parallel", PGC_POSTMASTER, GP_ARRAY_TUNING,
			gettext_noop("Activate parallel segment transition."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&gp_fts_transition_parallel,
		true, NULL, NULL
	},

	{
		{"gp_debug_pgproc", PGC_POSTMASTER, DEVELOPER_OPTIONS,
			gettext_noop("Print debug info relevant to PGPROC."),
			NULL /* long description */ ,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&gp_debug_pgproc,
		false, NULL, NULL
	},

	{
		{"gp_appendonly_verify_block_checksums", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Verify the append-only block checksum when reading."),
			NULL,
			GUC_NOT_IN_SAMPLE | GUC_NO_SHOW_ALL
		},
		&gp_appendonly_verify_block_checksums,
		true, NULL, NULL
	},

	{
		{"gp_appendonly_verify_write_block", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Verify the append-only block as it is being written."),
			NULL,
			GUC_NOT_IN_SAMPLE | GUC_NO_SHOW_ALL
		},
		&gp_appendonly_verify_write_block,
		false, NULL, NULL
	},

	{
		{"gp_appendonly_verify_eof", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Verify append-only eof integrity before writing."),
			NULL,
			GUC_NOT_IN_SAMPLE | GUC_NO_SHOW_ALL
		},
		&gp_appendonly_verify_eof,
		true, NULL, NULL
	},

	{
		{"gp_appendonly_compaction", PGC_SUSET, APPENDONLY_TABLES,
			gettext_noop("Perform append-only compaction instead of eof truncation on vacuum."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NOT_IN_SAMPLE | GUC_NO_SHOW_ALL
		},
		&gp_appendonly_compaction,
		true, NULL, NULL
	},

	{
		{"gp_heap_require_relhasoids_match", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Issue an error on discovery of a mismatch between relhasoids and a tuple header."),
			NULL,
			GUC_NOT_IN_SAMPLE | GUC_NO_SHOW_ALL
		},
		&gp_heap_require_relhasoids_match,
		true, NULL, NULL
	},

	{
		{"debug_appendonly_rezero_quicklz_compress_scratch", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Zero the QuickLZ scratch buffer before each append-only block that is being compressed."),
			NULL,
			GUC_NOT_IN_SAMPLE | GUC_NO_SHOW_ALL
		},
		&Debug_appendonly_rezero_quicklz_compress_scratch,
		false, NULL, NULL
	},

	{
		{"debug_appendonly_guard_end_quicklz_scratch", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Put a guard area of all zeroes after the QuickLZ scratch buffers and verify it is still zero before and after compress and decompress operations."),
			NULL,
			GUC_NOT_IN_SAMPLE | GUC_NO_SHOW_ALL
		},
		&Debug_appendonly_guard_end_quicklz_scratch,
		false, NULL, NULL
	},

	{
		{"debug_appendonly_rezero_quicklz_decompress_scratch", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Zero the QuickLZ scratch buffer before each append-only block that is being decompressed."),
			NULL,
			GUC_NOT_IN_SAMPLE | GUC_NO_SHOW_ALL
		},
		&Debug_appendonly_rezero_quicklz_decompress_scratch,
		false, NULL, NULL
	},

	{
		{"gp_cost_hashjoin_chainwalk", PGC_USERSET, QUERY_TUNING_COST,
			gettext_noop("Enable the cost for walking the chain in the hash join"),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&gp_cost_hashjoin_chainwalk,
		false, NULL, NULL
	},

	{
		{"gp_set_read_only", PGC_SUSET, GP_ARRAY_CONFIGURATION,
			gettext_noop("Sets the system read only"),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&gp_set_read_only,
		false, NULL, NULL
	},

	{
		{"gp_set_proc_affinity", PGC_POSTMASTER, RESOURCES_KERNEL,
			gettext_noop("On postmaster startup, attempt to bind postmaster to a processor"),
			NULL
		},
		&gp_set_proc_affinity,
		false, NULL, NULL
	},

	{
		{"gp_is_writer", PGC_BACKEND, GP_WORKER_IDENTITY,
			gettext_noop("True in a worker process which can directly update its local database segment."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE
		},
		&Gp_is_writer,
		false, NULL, NULL
	},

	{
		{"gp_write_shared_snapshot", PGC_USERSET, UNGROUPED,
			gettext_noop("Forces the writer gang to set the shared snapshot."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NO_RESET_ALL | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE
		},
		&Gp_write_shared_snapshot,
		false, assign_gp_write_shared_snapshot, NULL
	},

	{
		{"gp_reraise_signal", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Do we attempt to dump core when a serious problem occurs."),
			NULL,
			GUC_NO_RESET_ALL
		},
		&gp_reraise_signal,
		true, NULL, NULL
	},

	{
		{"gp_backup_directIO", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Enable direct IO dump"),
			NULL
		},
		&gp_backup_directIO,
		false, NULL, NULL
	},

	{
		{"gp_external_enable_exec", PGC_POSTMASTER, EXTERNAL_TABLES,
			gettext_noop("Enable selecting from an external table with an EXECUTE clause."),
			NULL
		},
		&gp_external_enable_exec,
		true, NULL, NULL
	},

	{
		{"gp_enable_fast_sri", PGC_USERSET, QUERY_TUNING_OTHER,
			gettext_noop("Enable single-slice single-row inserts."),
			NULL
		},
		&gp_enable_fast_sri,
		true, NULL, NULL
	},

	{
		{"gp_interconnect_full_crc", PGC_USERSET, QUERY_TUNING_OTHER,
			gettext_noop("Sanity check incoming data stream."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE | GUC_GPDB_ADDOPT
		},
		&gp_interconnect_full_crc,
		false, NULL, NULL
	},

	{
		{"gp_interconnect_log_stats", PGC_USERSET, QUERY_TUNING_OTHER,
			gettext_noop("Emit statistics from the UDP-IC at the end of every statement."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE | GUC_GPDB_ADDOPT
		},
		&gp_interconnect_log_stats,
		false, NULL, NULL
	},

	{
		{"gp_interconnect_cache_future_packets", PGC_USERSET, GP_ARRAY_TUNING,
			gettext_noop("Control whether future packets are cached."),
			NULL,
		},
		&gp_interconnect_cache_future_packets,
		true, NULL, NULL
	},

	{
		{"resource_scheduler", PGC_POSTMASTER, RESOURCES_MGM,
			gettext_noop("Enable resource scheduling."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&ResourceScheduler,
		true, NULL, NULL
	},
	{
		{"resource_select_only", PGC_POSTMASTER, RESOURCES_MGM,
			gettext_noop("Enable resource locking of SELECT only."),
			NULL
		},
		&ResourceSelectOnly,
		false, NULL, NULL
	},
	{
		{"resource_cleanup_gangs_on_wait", PGC_USERSET, RESOURCES_MGM,
			gettext_noop("Enable idle gang cleanup before resource lockwait."),
			NULL
		},
		&ResourceCleanupIdleGangs,
		true, NULL, NULL
	},

	{
		{"gp_debug_resqueue_priority", PGC_USERSET, RESOURCES_MGM,
			gettext_noop("Print out debugging information about backoff calls."),
			NULL,
			GUC_NO_SHOW_ALL
		},
		&gp_debug_resqueue_priority,
		false, NULL, NULL
	},

	{
		{"debug_print_full_dtm", PGC_SUSET, LOGGING_WHAT,
			gettext_noop("Prints full DTM information to server log."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&Debug_print_full_dtm,
		false, NULL, NULL
	},

	{
		{"debug_print_snapshot_dtm", PGC_SUSET, LOGGING_WHAT,
			gettext_noop("Prints snapshot DTM information to server log."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&Debug_print_snapshot_dtm,
		false, NULL, NULL
	},

	{
		{"debug_print_qd_mirroring", PGC_SUSET, LOGGING_WHAT,
			gettext_noop("Prints QD mirroring information to server log."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&Debug_print_qd_mirroring,
		false, NULL, NULL
	},

	{
		{"Debug_print_semaphore_detail", PGC_SUSET, LOGGING_WHAT,
			gettext_noop("Print semaphore detailed information."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&Debug_print_semaphore_detail,
		false, NULL, NULL
	},

	{
		{"debug_disable_distributed_snapshot", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Disables distributed snapshots."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&Debug_disable_distributed_snapshot,
		false, NULL, NULL
	},

	{
		{"debug_abort_after_distributed_prepared", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Cause an abort after all segments are prepared but before the distributed commit is written."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&Debug_abort_after_distributed_prepared,
		false, NULL, NULL
	},

	{
		{"debug_abort_after_segment_prepared", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Cause an abort after segment has written prepared XLOG record."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&Debug_abort_after_segment_prepared,
		false, NULL, NULL
	},

	{
		{"debug_appendonly_print_blockdirectory", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Print log messages for append-only block directory."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&Debug_appendonly_print_blockdirectory,
		false, NULL, NULL
	},

	{
		{"Debug_appendonly_print_read_block", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Print log messages for append-only reads."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&Debug_appendonly_print_read_block,
		false, NULL, NULL
	},

	{
		{"Debug_appendonly_print_append_block", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Print log messages for append-only writes."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&Debug_appendonly_print_append_block,
		false, NULL, NULL
	},

	{
		{"debug_appendonly_print_visimap", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Print log messages for append-only visibility bitmap information."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&Debug_appendonly_print_visimap,
		false, NULL, NULL
	},

	{
		{"debug_appendonly_print_compaction", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Print log messages about append-only visibility compactions."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&Debug_appendonly_print_compaction,
		false, NULL, NULL
	},

	{
		{"debug_appendonly_print_insert", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Print log messages for append-only insert."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&Debug_appendonly_print_insert,
		false, NULL, NULL
	},

	{
		{"debug_appendonly_print_insert_tuple", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Print log messages for append-only insert tuples (caution -- generates a lot of log!)."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&Debug_appendonly_print_insert_tuple,
		false, NULL, NULL
	},

	{
		{"debug_appendonly_print_scan", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Print log messages for append-only scan."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&Debug_appendonly_print_scan,
		false, NULL, NULL
	},

	{
		{"debug_appendonly_print_scan_tuple", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Print log messages for append-only scan tuples (caution -- generates a lot of log!)."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&Debug_appendonly_print_scan_tuple,
		false, NULL, NULL
	},

	{
		{"debug_appendonly_print_delete", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Print log messages for append-only delete."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&Debug_appendonly_print_delete,
		false, NULL, NULL
	},

	{
		{"debug_appendonly_print_storage_headers", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Print log messages for append-only storage headers."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&Debug_appendonly_print_storage_headers,
		false, NULL, NULL
	},

	{
		{"debug_appendonly_print_verify_write_block", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Print log messages for append-only verify block during write."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&Debug_appendonly_print_verify_write_block,
		false, NULL, NULL
	},

	{
		{"debug_appendonly_use_no_toast", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Use no toast for an append-only table.  Store the large row inline."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&Debug_appendonly_use_no_toast,
		false, NULL, NULL
	},

	{
		{"debug_appendonly_print_segfile_choice", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Print log messages for append-only writers about their choice for AO segment file."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&Debug_appendonly_print_segfile_choice,
		false, NULL, NULL
	},

1546 1547 1548 1549 1550 1551 1552 1553 1554
	{
		{"test_AppendOnlyHash_eviction_vs_just_marking_not_inuse", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Helps to test evicting the entry for AppendOnlyHash as soon as its usage is done instead of just marking it not inuse."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&test_AppendOnlyHash_eviction_vs_just_marking_not_inuse,
		false, NULL, NULL
	},
1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056

	{
		{"debug_appendonly_print_datumstream", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Print log messages for append-only datum stream content."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&Debug_appendonly_print_datumstream,
		false, NULL, NULL
	},

	{
		{"debug_xlog_insert_print", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Print XLOG Insert record debugging information."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&Debug_xlog_insert_print,
		false, NULL, NULL
	},

	{
		{"debug_xlog_record_read", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Print debug information for xlog record read."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&debug_xlog_record_read,
		false, NULL, NULL
	},

	{
		{"debug_persistent_print", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Print persistent file-system object debugging information."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&Debug_persistent_print,
		false, NULL, NULL
	},

	{
		{"debug_persistent_recovery_print", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Print persistent recovery debugging information."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&Debug_persistent_recovery_print,
		false, NULL, NULL
	},

	{
		{"Disable_persistent_recovery_logging", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("By default important persistent recovery information is logged, setting this GUC allows to disable it if required"),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&Disable_persistent_recovery_logging,
		true, NULL, NULL
	},

	{
		{"debug_persistent_store_print", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Print persistent file-system object store debugging information."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&Debug_persistent_store_print,
		false, NULL, NULL
	},

	{
		{"debug_persistent_bootstrap_print", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Print persistent store debugging information during bootstrap."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&Debug_persistent_bootstrap_print,
		false, NULL, NULL
	},

	{
		{"persistent_integrity_checks", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("When set enables all set of integrity checks for persistent tables."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&persistent_integrity_checks,
		false, NULL, NULL
	},

	{
		{"debug_persistent_ptcat_verification", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("When set, it enables all set of cross catalog consistency integrity checks for persistent tables in Startup pass 4."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&debug_persistent_ptcat_verification,
		false, NULL, NULL
	},

	{
		{"debug_print_persistent_checks", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("When set enables printing of logs in integrity checks for persistent tables module."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&debug_print_persistent_checks,
		false, NULL, NULL
	},

	{
		{"Debug_bulk_load_bypass_wal", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Use new bulk load bypass WAL logic."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&Debug_bulk_load_bypass_wal,
		true, NULL, NULL
	},

	{
		{"debug_persistent_appendonly_commit_count_print", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Print persistent Append-Only resync commit count information."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&Debug_persistent_appendonly_commit_count_print,
		true, NULL, NULL
	},

	{
		{"debug_cancel_print", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Print cancel detail information."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&Debug_cancel_print,
		false, NULL, NULL
	},

	{
		{"debug_datumstream_write_print_small_varlena_info", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Print datum stream write small varlena information."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&Debug_datumstream_write_print_small_varlena_info,
		false, NULL, NULL
	},

	{
		{"debug_datumstream_write_print_large_varlena_info", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Print datum stream write large varlena information."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&Debug_datumstream_write_print_large_varlena_info,
		false, NULL, NULL
	},

	{
		{"debug_datumstream_read_check_large_varlena_integrity", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Check datum stream large object integrity."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&Debug_datumstream_read_check_large_varlena_integrity,
		false, NULL, NULL
	},

	{
		{"debug_datumstream_block_read_check_integrity", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Check datum stream block read integrity."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&Debug_datumstream_block_read_check_integrity,
		false, NULL, NULL
	},

	{
		{"debug_datumstream_block_write_check_integrity", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Check datum stream block write integrity."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&Debug_datumstream_block_write_check_integrity,
		false, NULL, NULL
	},

	{
		{"debug_datumstream_read_print_varlena_info", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Print datum stream read varlena information."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&Debug_datumstream_read_print_varlena_info,
		false, NULL, NULL
	},

	{
		{"debug_datumstream_write_use_small_initial_buffers", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Use small datum stream write buffers to stress growing logic."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&Debug_datumstream_write_use_small_initial_buffers,
		false, NULL, NULL
	},

	{
		{"debug_database_command_print", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Print database command debugging information."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&Debug_database_command_print,
		false, NULL, NULL
	},

	{
		{"gp_initdb_mirrored", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Indicate we are initializing a mirrored cluster during initdb."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&gp_initdb_mirrored,
		false, NULL, NULL
	},

	{
		{"gp_before_persistence_work", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Indicate we are initializing / upgrading and do not want to do persistence work yet."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&gp_before_persistence_work,
		false, NULL, NULL
	},

	{
		{"gp_before_filespace_setup", PGC_POSTMASTER, DEVELOPER_OPTIONS,
			gettext_noop("Indicates that the gp_persistent_filespace_node table is not setup and should not be used for lookups."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&gp_before_filespace_setup,
		false, NULL, NULL
	},

	{
		{"gp_startup_integrity_checks", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Perform integrity checks after performing startup but before allowing connections in."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&gp_startup_integrity_checks,
		true, NULL, NULL
	},

	{
		{"debug_print_xlog_relation_change_info", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Print relation change information"),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&Debug_print_xlog_relation_change_info,
		false, NULL, NULL
	},

	{
		{"debug_print_xlog_relation_change_info_skip_issues_only", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Print relation change information only when there is a skip issue"),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&Debug_print_xlog_relation_change_info_skip_issues_only,
		false, NULL, NULL
	},

	{
		{"debug_print_xlog_relation_change_info_backtrace_skip_issues", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Print relation change information backtrace when there is a skip issue"),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&Debug_print_xlog_relation_change_info_backtrace_skip_issues,
		false, NULL, NULL
	},

	{
		{"test_appendonly_override", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("For testing purposes, change the default of the appendonly create table option."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&Test_appendonly_override,
		false, NULL, NULL
	},

	{
		{"test_print_direct_dispatch_info", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("For testing purposes, print information about direct dispatch decisions."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&Test_print_direct_dispatch_info,
		false, NULL, NULL
	},

	{
		{"debug_bitmap_print_insert", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Print log messages for bitmap index insert routines (caution-- generate a lot of logs!)"),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&Debug_bitmap_print_insert,
		false, NULL, NULL
	},

	{
		{"gp_test_orientation_override", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("For testing purposes, change the default of the orientation to column."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE | GUC_GPDB_ADDOPT
		},
		&gp_test_orientation_override,
		false, NULL, NULL
	},

	{
		{"gp_permit_persistent_metadata_update", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Permit updates to persistent metadata tables."),
			gettext_noop("For system repair by experts."),
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE | GUC_GPDB_ADDOPT
		},
		&gp_permit_persistent_metadata_update,
		false, NULL, NULL
	},

	{
		{"gp_permit_relation_node_change", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Permit updates to gp_relation_node tables."),
			gettext_noop("For system repair by experts."),
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE | GUC_GPDB_ADDOPT
		},
		&gp_permit_relation_node_change,
		false, NULL, NULL
	},

	{
		{"master_mirroring_administrator_disable", PGC_POSTMASTER, GP_ARRAY_CONFIGURATION,
			gettext_noop("Used by gpstart to indicate the standby master was not started by the administrator."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&Master_mirroring_administrator_disable,
		false, NULL, NULL
	},

	{
		{"debug_dtm_action_primary", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Specify if the primary or mirror segment is the target of the debug DTM action."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&Debug_dtm_action_primary,
		DEBUG_DTM_ACTION_PRIMARY_DEFAULT, NULL, NULL
	},

	{
		{"gp_disable_tuple_hints", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Specify if reader should set hint bits on tuples."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE | GUC_GPDB_ADDOPT
		},
		&gp_disable_tuple_hints,
		true, NULL, NULL
	},
	{
		{"debug_print_server_processes", PGC_SUSET, LOGGING_WHAT,
			gettext_noop("Prints server process management to server log."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&Debug_print_server_processes,
		false, NULL, NULL
	},

	{
		{"debug_print_control_checkpoints", PGC_SUSET, LOGGING_WHAT,
			gettext_noop("Prints pg_control file checkpoint changes to server log."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&Debug_print_control_checkpoints,
		false, NULL, NULL
	},

	{
		{"gp_local_distributed_cache_stats", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Prints local-distributed cache statistics at end of commit / prepare."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&gp_local_distributed_cache_stats,
		false, NULL, NULL
	},

	{
		{"enable_partition_rules", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Enable creation of RULEs to implement partitioning"),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&enable_partition_rules,
		false, NULL, NULL
	},

	{
		{"gp_enable_gpperfmon", PGC_POSTMASTER, UNGROUPED,
			gettext_noop("Enable gpperfmon monitoring."),
			NULL,
		},
		&gp_enable_gpperfmon,
		false, gpvars_assign_gp_enable_gpperfmon, NULL
	},

	{
		{"gp_mapreduce_define", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Prepare mapreduce object creation"),	/* turn off statement
																 * logging */
			NULL,
			GUC_NO_SHOW_ALL | GUC_NO_RESET_ALL | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE | GUC_GPDB_ADDOPT
		},
		&gp_mapreduce_define,
		false, NULL, NULL
	},

	{
		{"coredump_on_memerror", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Generate core dump on memory error."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE | GUC_GPDB_ADDOPT
		},
		&coredump_on_memerror,
		false, NULL, NULL
	},
	{
		{"log_autostats", PGC_SUSET, LOGGING_WHAT,
			gettext_noop("Logs details of auto-stats issued ANALYZEs."),
			NULL
		},
		&log_autostats,
		true, NULL, NULL
	},
	{
		{"gp_statistics_pullup_from_child_partition", PGC_USERSET, QUERY_TUNING_METHOD,
			gettext_noop("This guc enables the planner to utilize statistics from partitions in planning queries on the parent."),
			NULL
		},
		&gp_statistics_pullup_from_child_partition,
		true, NULL, NULL
	},
	{
		{"gp_statistics_use_fkeys", PGC_USERSET, QUERY_TUNING_METHOD,
			gettext_noop("This guc enables the planner to utilize statistics derived from foreign key relationships."),
			NULL
		},
		&gp_statistics_use_fkeys,
		true, NULL, NULL
	},
	{
		{"gp_resqueue_priority", PGC_POSTMASTER, RESOURCES_MGM,
			gettext_noop("Enables priority scheduling."),
			NULL
		},
		&gp_enable_resqueue_priority,
		true, NULL, NULL
	},

	{
		{"gp_change_tracking", PGC_SUSET, UNGROUPED,
			gettext_noop("Allows disabling change tracking."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&gp_change_tracking,
		true, NULL, NULL
	},

	{
		{"gp_persistent_repair_global_sequence", PGC_SUSET, UNGROUPED,
			gettext_noop("Repair a global sequence number to use the maximum scanned value."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&gp_persistent_repair_global_sequence,
		false, NULL, NULL
	},

2057 2058 2059 2060 2061 2062 2063 2064 2065 2066
	{
		{"gp_validate_pt_info_relcache", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Validate persistent TID and serial number in relcache entry."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&gp_validate_pt_info_relcache,
		false, NULL, NULL
	},

2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096
	{
		{"filerep_crc_on", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("enable adler 32 crc in filerep"),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&Debug_filerep_crc_on,
		false, NULL, NULL
	},

	{
		{"rle_type_compression_stats", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("show compression ratio stats for rle_type compression"),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&rle_type_compression_stats,
		false, NULL, NULL
	},

	{
		{"debug_filerep_print", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("enable filerep logs"),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&Debug_filerep_print,
		false, NULL, NULL
	},

2097 2098 2099 2100 2101 2102 2103 2104 2105 2106
	{
		{"log_filerep_to_syslogger", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("log all filerep related log messages to the server log files"),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&log_filerep_to_syslogger,
		true, NULL, NULL
	},

2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123
	{
		{"debug_filerep_gcov", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("workaround for filerep gcov issue"),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&Debug_filerep_gcov,
		false, NULL, NULL
	},

	{
		{"debug_filerep_config_print", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("enable filerep config logs"),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&Debug_filerep_config_print,
2124
		true, NULL, NULL
2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378
	},

	{
		{"debug_filerep_memory_log_flush", PGC_SIGHUP, DEVELOPER_OPTIONS,
			gettext_noop("enable filerep config logs"),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&Debug_filerep_memory_log_flush,
		false, NULL, NULL
	},

	{
		{"filerep_mirrorvalidation_during_resync", PGC_POSTMASTER, DEVELOPER_OPTIONS,
			gettext_noop("Setting enables checking for file existence for all relations on mirror during incremental resynchronization"),
			NULL,
			GUC_NO_SHOW_ALL
		},
		&filerep_mirrorvalidation_during_resync,
		false, NULL, NULL
	},

	{
		{"debug_walrepl_snd", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Print debug messages for WAL sender in WAL based replication (Master Mirroring)."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&debug_walrepl_snd,
		false, NULL, NULL
	},

	{
		{"debug_walrepl_syncrep", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Print debug messages for synchronous behavior in WAL based replication (Master Mirroring)."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&debug_walrepl_syncrep,
		false, NULL, NULL
	},

	{
		{"debug_walrepl_rcv", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Print debug messages for WAL receiver in WAL based replication (Master Mirroring)."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&debug_walrepl_rcv,
		false, NULL, NULL
	},

	{
		{"debug_basebackup", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Print debug messages for basebackup mechanism (Master Mirroring)."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&debug_basebackup,
		false, NULL, NULL
	},

	{
		{"debug_latch", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Print debug messages for latch mechanism."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&debug_latch,
		false, NULL, NULL
	},

	{
		{"gp_crash_recovery_suppress_ao_eof", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Warning about crash recovery append only eof issue"),
			NULL,
			GUC_NOT_IN_SAMPLE | GUC_NO_SHOW_ALL
		},
		&gp_crash_recovery_suppress_ao_eof,
		false, NULL, NULL
	},

	{
		{"gp_encoding_check_locale_compatibility", PGC_POSTMASTER, CLIENT_CONN_LOCALE,
			gettext_noop("Enable check for compatibility of encoding and locale in createdb"),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&gp_encoding_check_locale_compatibility,
		true, NULL, NULL
	},

	{
		{"gp_temporary_files_filespace_repair", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Change the filespace inconsistency to a warning"),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&gp_temporary_files_filespace_repair,
		false, NULL, NULL
	},

	/* for pljava */
	{
		{"pljava_release_lingering_savepoints", PGC_SUSET, CUSTOM_OPTIONS,
			gettext_noop("If true, lingering savepoints will be released on function exit; if false, they will be rolled back"),
			NULL,
			GUC_GPDB_ADDOPT | GUC_NOT_IN_SAMPLE | GUC_SUPERUSER_ONLY
		},
		&pljava_release_lingering_savepoints,
		false, NULL, NULL
	},
	{
		{"pljava_debug", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Stop the backend to attach a debugger"),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE | GUC_SUPERUSER_ONLY
		},
		&pljava_debug,
		false, NULL, NULL
	},

	/* for SimEx */
	{
		{"gp_simex_init", PGC_POSTMASTER, GP_ERROR_HANDLING,
			gettext_noop("Initialize exception simulation - used to set up simulation at startup"),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&gp_simex_init,
		false, NULL, NULL
	},

	{
		{"gp_simex_run", PGC_USERSET, GP_ERROR_HANDLING,
			gettext_noop("Run exception simulation - used to control starting/stopping simulation at runtime"),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE | GUC_GPDB_ADDOPT
		},
		&gp_simex_run,
		false, NULL, NULL
	},

	{
		{"gp_keep_all_xlog", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Do not remove old xlog files."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&gp_keep_all_xlog,
		false, NULL, NULL
	},

	{
		{"gp_test_time_slice", PGC_USERSET, GP_ERROR_HANDLING,
			gettext_noop("Check for time slice violation between checks for interrupts"),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE | GUC_GPDB_ADDOPT
		},
		&gp_test_time_slice,
		false, NULL, NULL
	},

	{
		{"gp_test_deadlock_hazard", PGC_USERSET, GP_ERROR_HANDLING,
			gettext_noop("Check if a lightweight lock is already held when requesting a database lock"),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE | GUC_GPDB_ADDOPT
		},
		&gp_test_deadlock_hazard,
		false, NULL, NULL
	},

	{
		{"gp_cancel_query_print_log", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Print out debugging info for a canceled query"),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE | GUC_GPDB_ADDOPT
		},
		&gp_cancel_query_print_log,
		false, NULL, NULL
	},

	{
		{"gp_partitioning_dynamic_selection_log", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Print out debugging info for GPDB dynamic partition selection"),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE | GUC_GPDB_ADDOPT
		},
		&gp_partitioning_dynamic_selection_log,
		false, NULL, NULL
	},

	{
		{"gp_perfmon_print_packet_info", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Print out debugging info for a Perfmon packet"),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE | GUC_GPDB_ADDOPT
		},
		&gp_perfmon_print_packet_info,
		false, NULL, NULL
	},

	{
		{"gp_log_stack_trace_lines", PGC_USERSET, LOGGING_WHAT,
			gettext_noop("Control if file/line information is included in stack traces"),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE | GUC_GPDB_ADDOPT
		},
		&gp_log_stack_trace_lines,
		true, NULL, NULL
	},

	{

		{"gp_log_resqueue_memory", PGC_USERSET, LOGGING_WHAT,
			gettext_noop("Prints out messages related to resource queue's memory management."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE | GUC_GPDB_ADDOPT
		},
		&gp_log_resqueue_memory,
		false, NULL, NULL
	},

	{
		{"gp_resqueue_print_operator_memory_limits", PGC_USERSET, LOGGING_WHAT,
			gettext_noop("Prints out the memory limit for operators (in explain) assigned by resource queue's "
						 "memory management."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE | GUC_GPDB_ADDOPT
		},
		&gp_resqueue_print_operator_memory_limits,
		false, NULL, NULL
	},

	{
		{"gp_dynamic_partition_pruning", PGC_USERSET, QUERY_TUNING_METHOD,
			gettext_noop("This guc enables plans that can dynamically eliminate scanning of partitions."),
			NULL
		},
		&gp_dynamic_partition_pruning,
		true, NULL, NULL
	},

	{
		{"gp_cte_sharing", PGC_USERSET, QUERY_TUNING_METHOD,
			gettext_noop("This guc enables sharing of plan fragments for common table expressions."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&gp_cte_sharing,
		false, NULL, NULL
	},

2379 2380 2381 2382 2383 2384 2385 2386 2387 2388
	{
		{"gp_enable_relsize_collection", PGC_USERSET, QUERY_TUNING_METHOD,
			gettext_noop("This guc enables relsize collection when stats are not present. If disabled and stats are not present a default "
					     "value is used."),
			NULL
		},
		&gp_enable_relsize_collection,
		false, NULL, NULL
	},

2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456
	{
		{"gp_log_dynamic_partition_pruning", PGC_USERSET, LOGGING_WHAT,
			gettext_noop("This guc enables debug messages related to dynamic partition pruning."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&gp_log_dynamic_partition_pruning,
		false, NULL, NULL
	},

	{
		{"gp_ignore_window_exclude", PGC_USERSET, COMPAT_OPTIONS_PREVIOUS,
			gettext_noop("Ignore EXCLUDE in window frame specifications."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&gp_ignore_window_exclude,
		false, NULL, NULL
	},

	{
		{"gp_create_table_random_default_distribution", PGC_USERSET, COMPAT_OPTIONS,
			gettext_noop("Set the default distribution of a table to RANDOM."),
			NULL,
			GUC_NOT_IN_SAMPLE
		},
		&gp_create_table_random_default_distribution,
		false, NULL, NULL
	},

	{
		{"gp_allow_non_uniform_partitioning_ddl", PGC_USERSET, COMPAT_OPTIONS,
			gettext_noop("Allow DDL that will create multi-level partition table with non-uniform hierarchy."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&gp_allow_non_uniform_partitioning_ddl,
		true, NULL, NULL
	},

	{
		{"gp_enable_exchange_default_partition", PGC_USERSET, COMPAT_OPTIONS,
			gettext_noop("Allow DDL that will exchange default partitions."),
			NULL
		},
		&gp_enable_exchange_default_partition,
		false, NULL, NULL
	},

	{
		{"optimizer", PGC_USERSET, QUERY_TUNING_METHOD,
			gettext_noop("Enable the new optimizer."),
			NULL
		},
		&optimizer,
		false, assign_optimizer, NULL
	},

	{
		{"optimizer_log", PGC_USERSET, LOGGING_WHAT,
			gettext_noop("Log optimizer messages."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_log,
		true, NULL, NULL
	},

2457 2458 2459 2460 2461 2462 2463 2464 2465 2466
	{
		{"optimizer_trace_fallback", PGC_USERSET, LOGGING_WHAT,
			gettext_noop("Print a message at INFO level, whenever GPORCA falls back."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_trace_fallback,
		false, NULL, NULL
	},

2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507
	{
		{"optimizer_partition_selection_log", PGC_USERSET, LOGGING_WHAT,
			gettext_noop("Log optimizer partition selection."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE | GUC_GPDB_ADDOPT
		},
		&optimizer_partition_selection_log,
		false, NULL, NULL
	},

	{
		{"optimizer_print_query", PGC_USERSET, LOGGING_WHAT,
			gettext_noop("Prints the optimizer's input query expression tree."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_print_query,
		false, NULL, NULL
	},

	{
		{"optimizer_print_plan", PGC_USERSET, LOGGING_WHAT,
			gettext_noop("Prints the plan expression tree produced by the optimizer."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_print_plan,
		false, NULL, NULL
	},

	{
		{"optimizer_print_xform", PGC_USERSET, LOGGING_WHAT,
			gettext_noop("Prints optimizer transformation information."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_print_xform,
		false, NULL, NULL
	},

	{
2508 2509 2510
		{"optimizer_metadata_caching", PGC_USERSET, QUERY_TUNING_METHOD,
			gettext_noop("This guc enables the optimizer to cache and reuse metadata."),
			NULL
2511
		},
2512
		&optimizer_metadata_caching,
2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855
		true, NULL, NULL
	},

	{
		{"optimizer_disable_missing_stats_collection", PGC_USERSET, LOGGING_WHAT,
			gettext_noop("Disable collecting of columns with missing statistics."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_disable_missing_stats_collection,
		false, NULL, NULL
	},

	{
		{"optimizer_disable_xform_result_printing", PGC_USERSET, LOGGING_WHAT,
			gettext_noop("Disable printing the input and output of optimizer transformations."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_disable_xform_result_printing,
		false, NULL, NULL
	},

	{
		{"optimizer_print_memo_after_exploration", PGC_USERSET, LOGGING_WHAT,
			gettext_noop("Print optimizer memo structure after the exploration phase."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_print_memo_after_exploration,
		false, NULL, NULL
	},

	{
		{"optimizer_print_memo_after_implementation", PGC_USERSET, LOGGING_WHAT,
			gettext_noop("Print optimizer memo structure after the implementation phase."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_print_memo_after_implementation,
		false, NULL, NULL
	},

	{
		{"optimizer_print_memo_after_optimization", PGC_USERSET, LOGGING_WHAT,
			gettext_noop("Print optimizer memo structure after optimization."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_print_memo_after_optimization,
		false, NULL, NULL
	},

	{
		{"optimizer_print_job_scheduler", PGC_USERSET, LOGGING_WHAT,
			gettext_noop("Print the jobs in the scheduler on each job completion."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_print_job_scheduler,
		false, NULL, NULL
	},

	{
		{"optimizer_print_expression_properties", PGC_USERSET, LOGGING_WHAT,
			gettext_noop("Print expression properties."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_print_expression_properties,
		false, NULL, NULL
	},

	{
		{"optimizer_print_group_properties", PGC_USERSET, LOGGING_WHAT,
			gettext_noop("Print group properties."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_print_group_properties,
		false, NULL, NULL
	},

	{
		{"optimizer_print_optimization_context", PGC_USERSET, LOGGING_WHAT,
			gettext_noop("Print the optimization context."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_print_optimization_context,
		false, NULL, NULL
	},

	{
		{"optimizer_print_optimization_stats", PGC_USERSET, LOGGING_WHAT,
			gettext_noop("Print optimization stats."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_print_optimization_stats,
		false, NULL, NULL
	},

	{
		{"optimizer_extract_dxl_stats", PGC_USERSET, LOGGING_WHAT,
			gettext_noop("Extract plan stats in dxl."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_extract_dxl_stats,
		false, NULL, NULL
	},
	{
		{"optimizer_extract_dxl_stats_all_nodes", PGC_USERSET, LOGGING_WHAT,
			gettext_noop("Extract plan stats for all physical dxl nodes."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_extract_dxl_stats_all_nodes,
		false, NULL, NULL
	},
	{
		{"optimizer_dpe_stats", PGC_USERSET, LOGGING_WHAT,
			gettext_noop("Enable statistics derivation for partitioned tables with dynamic partition elimination."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_dpe_stats,
		false, NULL, NULL
	},
	{
		{"optimizer_enable_indexjoin", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Enable index nested loops join plans in the optimizer."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_enable_indexjoin,
		true, NULL, NULL
	},
	{
		{"optimizer_enable_motions_masteronly_queries", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Enable plans with Motion operators in the optimizer for queries with no distributed tables."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_enable_motions_masteronly_queries,
		false, NULL, NULL
	},
	{
		{"optimizer_enable_motions", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Enable plans with Motion operators in the optimizer."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_enable_motions,
		true, NULL, NULL
	},
	{
		{"optimizer_enable_motion_broadcast", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Enable plans with Motion Broadcast operators in the optimizer."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_enable_motion_broadcast,
		true, NULL, NULL
	},
	{
		{"optimizer_enable_motion_gather", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Enable plans with Motion Gather operators in the optimizer."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_enable_motion_gather,
		true, NULL, NULL
	},
	{
		{"optimizer_enable_motion_redistribute", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Enable plans with Motion Redistribute operators in the optimizer."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_enable_motion_redistribute,
		true, NULL, NULL
	},
	{
		{"optimizer_enable_sort", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Enable plans with Sort operators in the optimizer."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_enable_sort,
		true, NULL, NULL
	},
	{
		{"optimizer_enable_materialize", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Enable plans with Materialize operators in the optimizer."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_enable_materialize,
		true, NULL, NULL
	},
	{
		{"optimizer_enable_partition_propagation", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Enable plans with Partition Propagation operators in the optimizer."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_enable_partition_propagation,
		true, NULL, NULL
	},
	{
		{"optimizer_enable_partition_selection", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Enable plans with Partition Selection operators in the optimizer."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_enable_partition_selection,
		true, NULL, NULL
	},
	{
		{"optimizer_enable_outerjoin_rewrite", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Enable outer join to inner join rewrite in the optimizer."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_enable_outerjoin_rewrite,
		true, NULL, NULL
	},
	{
		{"optimizer_direct_dispatch", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Enable direct dispatch in the optimizer."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_direct_dispatch,
		true, NULL, NULL
	},
	{
		{"optimizer_control", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Allow/disallow turning the optimizer on or off."),
			NULL
		},
		&optimizer_control,
		true, NULL, NULL
	},
	{
		{"optimizer_enable_space_pruning", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Enable space pruning in the optimizer."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_enable_space_pruning,
		true, NULL, NULL
	},

	{
		{"optimizer_enable_master_only_queries", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Process master only queries via the optimizer."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_enable_master_only_queries,
		false, NULL, NULL
	},

	{
		{"optimizer_multilevel_partitioning", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Enable optimization of queries on multilevel partitioned tables."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_multilevel_partitioning,
		true, NULL, NULL
	},

	{
		{"optimizer_enable_derive_stats_all_groups", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Enable stats derivation for all groups after exploration."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_enable_derive_stats_all_groups,
		false, NULL, NULL
	},

	{
		{"optimizer_explain_show_status", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Display optimizer version information in explain messages."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_explain_show_status,
		true, NULL, NULL
	},

	{
		{"optimizer_prefer_multistage_agg", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Prefer multistage aggregates in the optimizer."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_prefer_multistage_agg,
		true, NULL, NULL
	},

	{
		{"optimizer_enable_multiple_distinct_aggs", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Enable plans with multiple distinct aggregates in the optimizer."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_enable_multiple_distinct_aggs,
		false, NULL, NULL
	},

	{
		{"optimizer_prefer_expanded_distinct_aggs", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Prefer plans that expand multiple distinct aggregates into join of single distinct aggregate in the optimizer."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_prefer_expanded_distinct_aggs,
		true, NULL, NULL
	},

	{
		{"optimizer_prune_computed_columns", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Prune unused computed columns when pre-processing query"),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_prune_computed_columns,
		true, NULL, NULL
	},

	{
		{"optimizer_push_requirements_from_consumer_to_producer", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Optimize CTE producer plan on requirements enforced on top of CTE consumer in the optimizer."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_push_requirements_from_consumer_to_producer,
E
Entong Shen 已提交
2856
		true, NULL, NULL
2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094
	},

	{
		{"optimizer_enable_hashjoin_redistribute_broadcast_children", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Enable hash join plans with, Redistribute outer child and Broadcast inner child, in the optimizer."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_enable_hashjoin_redistribute_broadcast_children,
		false, NULL, NULL
	},
	{
		{"optimizer_enable_broadcast_nestloop_outer_child", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Enable nested loops join plans with replicated outer child in the optimizer."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_enable_broadcast_nestloop_outer_child,
		true, NULL, NULL
	},
	{
		{"optimizer_enforce_subplans", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Enforce correlated execution in the optimizer"),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_enforce_subplans,
		false, NULL, NULL
	},
	{
		{"optimizer_enable_assert_maxonerow", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Enable Assert MaxOneRow plans to check number of rows at runtime."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_enable_assert_maxonerow,
		true, NULL, NULL
	},
	{
		{"optimizer_enumerate_plans", PGC_USERSET, LOGGING_WHAT,
			gettext_noop("Enable plan enumeration"),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_enumerate_plans,
		false, NULL, NULL
	},

	{
		{"optimizer_sample_plans", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Enable plan sampling"),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_sample_plans,
		false, NULL, NULL
	},

	{
		{"optimizer_cte_inlining", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Enable CTE inlining"),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_cte_inlining,
		false, NULL, NULL
	},

	{
		{"optimizer_analyze_root_partition", PGC_USERSET, STATS_ANALYZE,
			gettext_noop("Enable statistics collection on root partitions during ANALYZE"),
			NULL
		},
		&optimizer_analyze_root_partition,
		false, NULL, NULL
	},

	{
		{"optimizer_analyze_midlevel_partition", PGC_USERSET, STATS_ANALYZE,
			gettext_noop("Enable statistics collection on intermediate partitions during ANALYZE"),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_analyze_midlevel_partition,
		false, NULL, NULL
	},

	{
		{"optimizer_enable_constant_expression_evaluation", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Enable constant expression evaluation in the optimizer"),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_enable_constant_expression_evaluation,
		true, NULL, NULL
	},

	{
		{"optimizer_use_external_constant_expression_evaluation_for_ints", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Use external constant expression evaluation in the optimizer for all integer types"),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_use_external_constant_expression_evaluation_for_ints,
		false, NULL, NULL
	},

	{
		{"optimizer_enable_bitmapscan", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Enable bitmap plans in the optimizer"),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_enable_bitmapscan,
		true, NULL, NULL
	},

	{
		{"optimizer_enable_outerjoin_to_unionall_rewrite", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Enable rewriting Left Outer Join to UnionAll"),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_enable_outerjoin_to_unionall_rewrite,
		false, NULL, NULL
	},

	{
		{"optimizer_apply_left_outer_to_union_all_disregarding_stats", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Always apply Left Outer Join to Inner Join UnionAll Left Anti Semi Join without looking at stats."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_apply_left_outer_to_union_all_disregarding_stats,
		false, NULL, NULL
	},

	{
		{"optimizer_enable_ctas", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Enable CTAS plans in the optimizer"),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_enable_ctas,
		true, NULL, NULL
	},

	{
		{"optimizer_remove_order_below_dml", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Remove OrderBy below a DML operation"),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_remove_order_below_dml,
		false, NULL, NULL
	},

	{
		{"optimizer_static_partition_selection", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Enable static partition selection"),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_static_partition_selection,
		true, NULL, NULL
	},

	{
		{"optimizer_enable_partial_index", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Enable heterogeneous index plans."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_enable_partial_index,
		true, NULL, NULL
	},

	{
		{"optimizer_dml_triggers", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Support DML with triggers."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_dml_triggers,
		false, NULL, NULL
	},

	{
		{"optimizer_dml_constraints", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Support DML with CHECK constraints and NOT NULL constraints."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_dml_constraints,
		true, NULL, NULL
	},

	{
		{"gp_log_optimization_time", PGC_USERSET, LOGGING_WHAT,
			gettext_noop("Writes time spent producing a plan to the server log"),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&gp_log_optimization_time,
		false, NULL, NULL
	},

	{
		{"gp_reject_internal_tcp_connection", PGC_POSTMASTER,
			DEVELOPER_OPTIONS,
			gettext_noop("Permit internal TCP connections to the master."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&gp_reject_internal_tcp_conn,
		true, NULL, NULL
	},

	{
		{"fts_diskio_check", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Controls if FTS should perform disk IO checks on primary segments as part of probe"),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&fts_diskio_check,
		true, NULL, NULL
	},

	{
		{"dml_ignore_target_partition_check", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Ignores checking whether the user provided correct partition during a direct insert to a leaf partition"),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE | GUC_GPDB_ADDOPT
		},
		&dml_ignore_target_partition_check,
		false, NULL, NULL
	},

3095 3096 3097 3098 3099 3100 3101 3102 3103 3104
	{
		{"optimizer_prefer_scalar_dqa_multistage_agg", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Prefer multistage aggregates for scalar distinct qualified aggregate in the optimizer."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_prefer_scalar_dqa_multistage_agg,
		true, NULL, NULL
	},

3105 3106 3107 3108
	{
		{"optimizer_parallel_union", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Enable parallel execution for UNION/UNION ALL queries."),
			NULL,
3109
			GUC_NOT_IN_SAMPLE
3110 3111 3112 3113 3114
		},
		&optimizer_parallel_union,
		false, NULL, NULL
	},

3115
	{
3116 3117
		{"optimizer_array_constraints", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Allows the optimizer's constraint framework to derive array constraints."),
3118 3119 3120
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
3121
		&optimizer_array_constraints,
3122 3123 3124
		false, NULL, NULL
	},

3125
	{
3126
		{"init_codegen", PGC_POSTMASTER, DEVELOPER_OPTIONS,
3127 3128 3129 3130
			gettext_noop("Enable just-in-time code generation."),
			NULL,
			GUC_NOT_IN_SAMPLE
		},
3131
		&init_codegen,
3132 3133 3134 3135 3136
#ifdef USE_CODEGEN
		true,
#else
		false,
#endif
3137
		assign_codegen, NULL
3138 3139 3140 3141 3142 3143
	},

	{
		{"codegen", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Perform just-in-time code generation."),
			NULL,
3144
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE | GUC_GPDB_ADDOPT
3145
		},
3146
		&codegen,
3147 3148
		false,
		assign_codegen, NULL
3149 3150
	},

3151 3152 3153 3154 3155 3156 3157
	{
		{"codegen_validate_functions", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Perform verify for generated functions to catch any error before compiling"),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&codegen_validate_functions,
3158 3159
#if defined(USE_ASSERT_CHECKING) && defined(USE_CODEGEN)
		true, 	/* true by default on debug builds. */
3160
#else
3161
		false,
3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217
#endif
		assign_codegen, NULL
	},
	{
		{"codegen_exec_variable_list", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Enable codegen for ExecVariableList"),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE | GUC_GPDB_ADDOPT
		},
		&codegen_exec_variable_list,
#ifdef USE_CODEGEN
		true,
#else
		false,
#endif
		assign_codegen, NULL
	},
	{
		{"codegen_slot_getattr", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Enable codegen for slot_get_attr"),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE | GUC_GPDB_ADDOPT
		},
		&codegen_slot_getattr,
#ifdef USE_CODEGEN
		true,
#else
		false,
#endif
		assign_codegen, NULL
	},
	{
		{"codegen_exec_eval_expr", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Enable codegen for ExecEvalExpr"),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE | GUC_GPDB_ADDOPT
		},
		&codegen_exec_eval_expr,
#ifdef USE_CODEGEN
		true,
#else
		false,
#endif
		assign_codegen, NULL
	},
	{
		{"codegen_advance_aggregate", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Enable codegen for AdvanceAggregate"),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE | GUC_GPDB_ADDOPT
		},
		&codegen_advance_aggregate,
#ifdef USE_CODEGEN
		true,
#else
		false,
3218
#endif
3219
		assign_codegen, NULL
3220
	},
3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231

	{
		{"vmem_process_interrupt", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Checks for interrupts before reserving VMEM"),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE | GUC_GPDB_ADDOPT
		},
		&vmem_process_interrupt,
		false, NULL, NULL
	},

3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260
	/* End-of-list marker */
	{
		{NULL, 0, 0, NULL, NULL}, NULL, false, NULL, NULL
	}
};

struct config_int ConfigureNamesInt_gp[] =
{
	/* maximum read/write I/O size for DD Boost is 1MB */
	{
		{"ddboost_buf_size", PGC_SIGHUP, DEVELOPER_OPTIONS,
			gettext_noop("size of ddboost dump/restore buffer"),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&ddboost_buf_size,
		524288, 65536, 1048576, NULL, NULL
	},

	{
		{"readable_external_table_timeout", PGC_USERSET, EXTERNAL_TABLES,
			gettext_noop("Cancel the query if no data read within N seconds."),
			gettext_noop("A value of 0 turns off the timeout."),
			GUC_UNIT_S | GUC_NOT_IN_SAMPLE
		},
		&readable_external_table_timeout,
		0, 0, INT_MAX, NULL, NULL
	},

3261 3262 3263 3264 3265 3266 3267 3268 3269 3270
	{
		{"writable_external_table_bufsize", PGC_USERSET, EXTERNAL_TABLES,
			gettext_noop("Buffer size in kilo bytes for writable external table before writing data to gpfdist."),
			gettext_noop("Valid value is between 32K and 128M: [32, 131072]."),
			GUC_UNIT_KB | GUC_NOT_IN_SAMPLE
		},
		&writable_external_table_bufsize,
		64, 32, 131072, NULL, NULL
	},

3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818
	{
		{"gp_cancel_query_delay_time", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("The time in milliseconds to delay a query cancellation."),
			NULL,
			GUC_UNIT_MS | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE | GUC_GPDB_ADDOPT
		},
		&gp_cancel_query_delay_time,
		0, 0, INT_MAX, NULL, NULL
	},

	{
		{"gp_max_local_distributed_cache", PGC_POSTMASTER, RESOURCES_MEM,
			gettext_noop("Sets the number of local-distributed transactions to cache for optimizing visibility processing by backends."),
			NULL
		},
		&gp_max_local_distributed_cache,
		1024, 0, INT_MAX, NULL, NULL
	},

	{
		{"gp_max_databases", PGC_POSTMASTER, RESOURCES_MEM,
			gettext_noop("Sets the maximum number of databases."),
			NULL
		},
		&gp_max_databases,
		GP_MAX_DATABASES_DEFAULT, 8, 256, NULL, NULL
	},

	{
		{"gp_max_tablespaces", PGC_POSTMASTER, RESOURCES_MEM,
			gettext_noop("Sets the maximum number of tablespaces."),
			NULL
		},
		&gp_max_tablespaces,
		GP_MAX_TABLESPACES_DEFAULT, 8, 2048, NULL, NULL
	},

	{
		{"gp_max_filespaces", PGC_POSTMASTER, RESOURCES_MEM,
			gettext_noop("Sets the maximum number of filespaces."),
			NULL
		},
		&gp_max_filespaces,
		GP_MAX_FILESPACES_DEFAULT, 8, 256, NULL, NULL
	},

	{
		{"debug_dtm_action_segment", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Sets the debug DTM action segment."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&Debug_dtm_action_segment,
		DEBUG_DTM_ACTION_SEGMENT_DEFAULT, 0, 1000, NULL, NULL
	},

	{
		{"debug_dtm_action_nestinglevel", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Sets the debug DTM action transaction nesting level."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&Debug_dtm_action_nestinglevel,
		DEBUG_DTM_ACTION_NESTINGLEVEL_DEFAULT, 0, 1000, NULL, NULL
	},

	{
		{"test_compresslevel_override", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("For testing purposes, the override value for compresslevel when non-default."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&Test_compresslevel_override,
		DEFAULT_COMPRESS_LEVEL, 0, 9, NULL, NULL
	},

	{
		{"test_blocksize_override", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("For testing purposes, the override value for append only blocksize when non-default."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&Test_blocksize_override,
		DEFAULT_APPENDONLY_BLOCK_SIZE, MIN_APPENDONLY_BLOCK_SIZE, MAX_APPENDONLY_BLOCK_SIZE, NULL, NULL
	},

	{
		{"test_safefswritesize_override", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("For testing purposes, the override value for append only safefswritesize when non-default."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE | GUC_GPDB_ADDOPT
		},
		&Test_safefswritesize_override,
		DEFAULT_FS_SAFE_WRITE_SIZE, 0, INT_MAX, NULL, NULL
	},

	{
		{"gp_safefswritesize", PGC_BACKEND, RESOURCES,
			gettext_noop("Minimum FS safe write size."),
			NULL
		},
		&gp_safefswritesize,
		DEFAULT_FS_SAFE_WRITE_SIZE, 0, INT_MAX, NULL, NULL
	},

	{
		{"planner_work_mem", PGC_USERSET, RESOURCES_MEM,
			gettext_noop("Sets the maximum memory to be used for query workspaces, "
						 "used in the planner only."),
			gettext_noop("The planner considers this much memory may be used by each internal "
						 "sort operation and hash table before switching to "
						 "temporary disk files."),
			GUC_UNIT_KB | GUC_GPDB_ADDOPT | GUC_NOT_IN_SAMPLE | GUC_NO_SHOW_ALL
		},
		&planner_work_mem,
		32768, 2 * BLCKSZ / 1024, MAX_KILOBYTES, NULL, NULL
	},

	{
		{"statement_mem", PGC_USERSET, RESOURCES_MEM,
			gettext_noop("Sets the memory to be reserved for a statement."),
			NULL,
			GUC_UNIT_KB | GUC_GPDB_ADDOPT
		},
		&statement_mem,
#ifdef USE_ASSERT_CHECKING
		/** Allow lower values for testing */
		128000, 50, INT_MAX, gpvars_assign_statement_mem, NULL
#else
		128000, 1000, INT_MAX, gpvars_assign_statement_mem, NULL
#endif
	},

	{
		{"max_statement_mem", PGC_SUSET, RESOURCES_MEM,
			gettext_noop("Sets the maximum value for statement_mem setting."),
			NULL,
			GUC_UNIT_KB | GUC_GPDB_ADDOPT
		},
		&max_statement_mem,
		2048000, 32768, INT_MAX, NULL, NULL
	},

	{
		{"gp_vmem_limit_per_query", PGC_POSTMASTER, RESOURCES_MEM,
			gettext_noop("Sets the maximum allowed memory per-statement on each segment."),
			NULL,
			GUC_UNIT_KB | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&gp_vmem_limit_per_query,
		0, 0, INT_MAX / 2, NULL, NULL
	},

	{
		{"gp_max_plan_size", PGC_SUSET, RESOURCES_MEM,
			gettext_noop("Sets the maximum size of a plan to be dispatched."),
			NULL,
			GUC_UNIT_KB
		},
		&gp_max_plan_size,
		0, 0, MAX_KILOBYTES, NULL, NULL
	},

	{
		{"gp_max_partition_level", PGC_SUSET, PRESET_OPTIONS,
			gettext_noop("Sets the maximum number of levels allowed when creating a partitioned table."),
			gettext_noop("Use 0 for no limit."),
			GUC_GPDB_ADDOPT | GUC_SUPERUSER_ONLY | GUC_NOT_IN_SAMPLE
		},
		&gp_max_partition_level,
		0, 0, INT_MAX, NULL, NULL
	},

	{
		{"gp_appendonly_compaction_threshold", PGC_USERSET, APPENDONLY_TABLES,
			gettext_noop("Threshold of the ratio of dirty data in a segment file over which the file"
						 " will be compacted during lazy vacuum."),
			NULL
		},
		&gp_appendonly_compaction_threshold,
		10, 0, 100, NULL, NULL
	},

	{
		{"gp_workfile_max_entries", PGC_POSTMASTER, RESOURCES,
			gettext_noop("Sets the maximum number of entries that can be stored in the workfile directory"),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&gp_workfile_max_entries,
		8192, 32, INT_MAX, NULL, NULL
	},

	{
		{"gp_workfile_limit_files_per_query", PGC_USERSET, RESOURCES,
			gettext_noop("Maximum number of workfiles allowed per query per segment."),
			gettext_noop("0 for no limit. Current query is terminated when limit is exceeded."),
			GUC_GPDB_ADDOPT
		},
		&gp_workfile_limit_files_per_query,
		100000, 0, INT_MAX, NULL, NULL,
	},

	{
		{"gp_vmem_idle_resource_timeout", PGC_USERSET, CLIENT_CONN_OTHER,
			gettext_noop("Sets the time a session can be idle (in milliseconds) before we release gangs on the segment DBs to free resources."),
			gettext_noop("A value of 0 turns off the timeout."),
			GUC_UNIT_MS | GUC_GPDB_ADDOPT
		},
		&IdleSessionGangTimeout,
#ifdef USE_ASSERT_CHECKING
		600000, 0, INT_MAX, NULL, NULL	/* 10 minutes by default on debug
										 * builds. */
#else
		18000, 0, INT_MAX, NULL, NULL
#endif
	},

	{
		{"xid_stop_limit", PGC_POSTMASTER, WAL,
			gettext_noop("Sets the number of XIDs before XID wraparound at which we will no longer allow the system to be started."),
			NULL,
			GUC_NOT_IN_SAMPLE | GUC_NO_SHOW_ALL
		},
		&xid_stop_limit,
		1000000000, 10000000, INT_MAX, NULL, NULL
	},
	{
		{"xid_warn_limit", PGC_POSTMASTER, WAL,
			gettext_noop("Sets the number of XIDs before xid_stop_limit at which we will begin emitting warnings regarding XID wraparound."),
			NULL,
			GUC_NOT_IN_SAMPLE | GUC_NO_SHOW_ALL
		},
		&xid_warn_limit,
		500000000, 10000000, INT_MAX, NULL, NULL
	},
	{
		{"gp_dbid", PGC_POSTMASTER, PRESET_OPTIONS,
			gettext_noop("The dbid used by this server."),
			NULL,
			GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE
		},
		&GpIdentity.dbid,
		UNINITIALIZED_GP_IDENTITY_VALUE, INT_MIN, INT_MAX, NULL, NULL
	},

	{
		{"gp_contentid", PGC_POSTMASTER, PRESET_OPTIONS,
			gettext_noop("The contentid used by this server."),
			NULL,
			GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE
		},
		&GpIdentity.segindex,
		UNINITIALIZED_GP_IDENTITY_VALUE, INT_MIN, INT_MAX, NULL, NULL
	},

	{
		{"gp_num_contents_in_cluster", PGC_POSTMASTER, PRESET_OPTIONS,
			gettext_noop("Sets the number of segments in the cluster."),
			NULL,
			GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE
		},
		&GpIdentity.numsegments,
		UNINITIALIZED_GP_IDENTITY_VALUE, INT_MIN, INT_MAX, NULL, NULL
	},

	{
		{"gp_standby_dbid", PGC_POSTMASTER, PRESET_OPTIONS,
			gettext_noop("Sets DBID of standby master."),
			NULL,
			GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE
		},
		&GpStandbyDbid,
		0, INT_MIN, 32767, NULL, NULL
	},

	{
		{"gp_max_csv_line_length", PGC_USERSET, EXTERNAL_TABLES,
			gettext_noop("Maximum allowed length of a csv input data row in bytes"),
			NULL,
		},
		&gp_max_csv_line_length,
		1 * 1024 * 1024, 32 * 1024, 4 * 1024 * 1024, NULL, NULL
	},

	/*
	 * Solaris doesn't support setting SO_SNDTIMEO, so setting this won't work
	 * on Solaris (MPP-22526)
	 */
	{
		{"gp_connection_send_timeout", PGC_SIGHUP, CLIENT_CONN_OTHER,
			gettext_noop("Timeout for sending data to unresponsive clients (seconds)"),
			gettext_noop("A value of 0 uses the system default."),
		},
		&gp_connection_send_timeout,
		3600, 0, INT_MAX, NULL, NULL
	},

	{
		{"gp_filerep_tcp_keepalives_idle", PGC_USERSET, GP_ARRAY_TUNING,
			gettext_noop("Seconds between issuing TCP keepalives for FileRep connection."),
			gettext_noop("A value of 0 uses the system default."),
			GUC_UNIT_S
		},
		&gp_filerep_tcp_keepalives_idle,
		60, 0, INT_MAX, NULL, NULL
	},

	{
		{"gp_filerep_tcp_keepalives_interval", PGC_USERSET, GP_ARRAY_TUNING,
			gettext_noop("Seconds between TCP keepalive retransmits for FileRep connection."),
			gettext_noop("A value of 0 uses the system default."),
			GUC_UNIT_S
		},
		&gp_filerep_tcp_keepalives_interval,
		30, 0, INT_MAX, NULL, NULL
	},

	{
		{"gp_filerep_tcp_keepalives_count", PGC_USERSET, GP_ARRAY_TUNING,
			gettext_noop("Maximum number of TCP keepalive retransmits for FileRep connection."),
			gettext_noop("This controls the number of consecutive keepalive retransmits that can be "
						 "lost before a connection is considered dead. A value of 0 uses the "
						 "system default."),
		},
		&gp_filerep_tcp_keepalives_count,
		2, 0, INT_MAX, NULL, NULL
	},


	{
		{"max_resource_queues", PGC_POSTMASTER, RESOURCES_MGM,
			gettext_noop("Maximum number of resource queues."),
			NULL
		},
		&MaxResourceQueues,
		9, 0, INT_MAX, NULL, NULL
	},

	{
		{"max_resource_portals_per_transaction", PGC_POSTMASTER, RESOURCES_MGM,
			gettext_noop("Maximum number of resource queues."),
			NULL
		},
		&MaxResourcePortalsPerXact,
		64, 0, INT_MAX, NULL, NULL
	},

	{
		{"max_appendonly_tables", PGC_POSTMASTER, APPENDONLY_TABLES,
			gettext_noop("Maximum number of different (unrelated) append only tables that can participate in writing data concurrently."),
			NULL
		},
		&MaxAppendOnlyTables,
		2048, 0, INT_MAX, NULL, NULL
	},

	{
		{"gp_external_max_segs", PGC_USERSET, EXTERNAL_TABLES,
			gettext_noop("Maximum number of segments that connect to a single gpfdist URL."),
			NULL
		},
		&gp_external_max_segs,
		64, 1, INT_MAX, NULL, NULL
	},

	{
		{"gp_max_packet_size", PGC_BACKEND, GP_ARRAY_TUNING,
			gettext_noop("Sets the max packet size for the Interconnect."),
			NULL,
			GUC_GPDB_ADDOPT
		},
		&Gp_max_packet_size,
		DEFAULT_PACKET_SIZE, MIN_PACKET_SIZE, MAX_PACKET_SIZE, NULL, NULL
	},

	{
		{"gp_interconnect_queue_depth", PGC_USERSET, GP_ARRAY_TUNING,
			gettext_noop("Sets the maximum size of the receive queue for each connection in the UDP interconnect"),
			NULL,
			GUC_GPDB_ADDOPT
		},
		&Gp_interconnect_queue_depth,
		4, 1, 4096, NULL, NULL
	},

	{
		{"gp_interconnect_snd_queue_depth", PGC_USERSET, GP_ARRAY_TUNING,
			gettext_noop("Sets the maximum size of the send queue for each connection in the UDP interconnect"),
			NULL,
			GUC_GPDB_ADDOPT
		},
		&Gp_interconnect_snd_queue_depth,
		2, 1, 4096, NULL, NULL
	},

	{
		{"gp_interconnect_timer_period", PGC_USERSET, GP_ARRAY_TUNING,
			gettext_noop("Sets the timer period (in ms) for UDP interconnect"),
			NULL,
			GUC_UNIT_MS | GUC_GPDB_ADDOPT
		},
		&Gp_interconnect_timer_period,
		5, 1, 100, NULL, NULL
	},

	{
		{"gp_interconnect_timer_checking_period", PGC_USERSET, GP_ARRAY_TUNING,
			gettext_noop("Sets the timer checking period (in ms) for UDP interconnect"),
			NULL,
			GUC_UNIT_MS | GUC_GPDB_ADDOPT
		},
		&Gp_interconnect_timer_checking_period,
		20, 1, 100, NULL, NULL
	},

	{
		{"gp_interconnect_default_rtt", PGC_USERSET, GP_ARRAY_TUNING,
			gettext_noop("Sets the default rtt (in ms) for UDP interconnect"),
			NULL,
			GUC_UNIT_MS | GUC_GPDB_ADDOPT
		},
		&Gp_interconnect_default_rtt,
		20, 1, 1000, NULL, NULL
	},

	{
		{"gp_interconnect_min_rto", PGC_USERSET, GP_ARRAY_TUNING,
			gettext_noop("Sets the min rto (in ms) for UDP interconnect"),
			NULL,
			GUC_UNIT_MS | GUC_GPDB_ADDOPT
		},
		&Gp_interconnect_min_rto,
		20, 1, 1000, NULL, NULL
	},

	{
		{"gp_interconnect_transmit_timeout", PGC_USERSET, GP_ARRAY_TUNING,
			gettext_noop("Timeout (in seconds) on interconnect to transmit a packet"),
			gettext_noop("Used by Interconnect to timeout packet transmission."),
			GUC_UNIT_S | GUC_GPDB_ADDOPT
		},
		&Gp_interconnect_transmit_timeout,
		3600, 1, 7200, NULL, NULL
	},

	{
		{"gp_interconnect_min_retries_before_timeout", PGC_USERSET, GP_ARRAY_TUNING,
			gettext_noop("Sets the min retries before reporting a transmit timeout in the interconnect."),
			NULL,
			GUC_GPDB_ADDOPT
		},
		&Gp_interconnect_min_retries_before_timeout,
		100, 1, 4096, NULL, NULL
	},

	{
		{"gp_udp_bufsize_k", PGC_BACKEND, GP_ARRAY_TUNING,
			gettext_noop("Sets recv buf size of UDP interconnect, for testing."),
			NULL,
			GUC_GPDB_ADDOPT
		},
		&Gp_udp_bufsize_k,
		0, 0, 32768, NULL, NULL
	},

#ifdef USE_ASSERT_CHECKING
	{
		{"gp_udpic_dropseg", PGC_USERSET, GP_ARRAY_TUNING,
			gettext_noop("Specifies a segment to which the dropacks, and dropxmit settings will be applied, for testing. (The default is to apply the dropacks and dropxmit settings to all segments)"),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE | GUC_GPDB_ADDOPT
		},
		&gp_udpic_dropseg,
		UNDEF_SEGMENT, UNDEF_SEGMENT, INT_MAX, NULL, NULL
	},

	{
		{"gp_udpic_dropacks_percent", PGC_USERSET, GP_ARRAY_TUNING,
			gettext_noop("Sets the percentage of correctly-received acknowledgment packets to synthetically drop, for testing. (affected by gp_udpic_dropseg)"),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE | GUC_GPDB_ADDOPT
		},
		&gp_udpic_dropacks_percent,
		0, 0, 100, NULL, NULL
	},

	{
		{"gp_udpic_dropxmit_percent", PGC_USERSET, GP_ARRAY_TUNING,
			gettext_noop("Sets the percentage of correctly-received data packets to synthetically drop, for testing. (affected by gp_udpic_dropseg)"),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE | GUC_GPDB_ADDOPT
		},
		&gp_udpic_dropxmit_percent,
		0, 0, 100, NULL, NULL
	},

	{
		{"gp_udpic_fault_inject_percent", PGC_USERSET, GP_ARRAY_TUNING,
			gettext_noop("Sets the percentage of fault injected into system calls, for testing. (affected by gp_udpic_dropseg)"),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE | GUC_GPDB_ADDOPT
		},
		&gp_udpic_fault_inject_percent,
		0, 0, 100, NULL, NULL
	},

	{
		{"gp_udpic_fault_inject_bitmap", PGC_USERSET, GP_ARRAY_TUNING,
			gettext_noop("Sets the bitmap for faults injection, for testing. (affected by gp_udpic_dropseg)"),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE | GUC_GPDB_ADDOPT
		},
		&gp_udpic_fault_inject_bitmap,
		0, 0, INT_MAX, NULL, NULL
	},

	{
		{"gp_udpic_network_disable_ipv6", PGC_USERSET, GP_ARRAY_TUNING,
			gettext_noop("Sets the address info hint to disable the ipv6, for testing. (affected by gp_udpic_dropseg)"),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE | GUC_GPDB_ADDOPT
		},
		&gp_udpic_network_disable_ipv6,
		0, 0, 1, NULL, NULL
	},

#endif
	{
		{"gp_interconnect_hash_multiplier", PGC_SUSET, GP_ARRAY_TUNING,
			gettext_noop("Sets the number of hash buckets used by the UDP interconnect to track connections (the number of buckets is given by the product of the segment count and the hash multipliers)."),
			NULL,
		},
		&Gp_interconnect_hash_multiplier,
		2, 1, 256, NULL, NULL
	},

	{
		{"gp_command_count", PGC_INTERNAL, CLIENT_CONN_OTHER,
			gettext_noop("Shows the number of commands received from the client in this session."),
			NULL,
			GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE
		},
		&gp_command_count,
		0, 0, INT_MAX, NULL, NULL
	},

	{
3819
		{"gp_connections_per_thread", PGC_BACKEND, GP_ARRAY_TUNING,
3820 3821
			gettext_noop("Sets the number of client connections handled in each thread."),
			NULL,
3822
			GUC_GPDB_ADDOPT
3823 3824
		},
		&gp_connections_per_thread,
3825
		0, 0, INT_MAX, assign_gp_connections_per_thread, show_gp_connections_per_thread
3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966
	},

	{
		{"gp_subtrans_warn_limit", PGC_POSTMASTER, RESOURCES,
			gettext_noop("Sets the warning limit on number of subtransactions in a transaction."),
			NULL,
			GUC_NOT_IN_SAMPLE
		},
		&gp_subtrans_warn_limit,
		16777216, 0, INT_MAX, NULL, NULL
	},

	{
		{"gp_cached_segworkers_threshold", PGC_USERSET, GP_ARRAY_TUNING,
			gettext_noop("Sets the maximum number of segment workers to cache between statements."),
			NULL,
			GUC_NOT_IN_SAMPLE
		},
		&gp_cached_gang_threshold,
		5, 0, INT_MAX, NULL, NULL
	},


	{
#ifdef USE_ASSERT_CHECKING
		{"gp_debug_linger", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Number of seconds for QD/QE process to linger upon fatal internal error."),
			gettext_noop("Allows an opportunity to debug the backend process before it terminates."),
			GUC_NOT_IN_SAMPLE | GUC_NO_RESET_ALL | GUC_UNIT_S | GUC_GPDB_ADDOPT
		},
		&gp_debug_linger,
		120, 0, 3600, NULL, NULL
#else
		{"gp_debug_linger", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Number of seconds for QD/QE process to linger upon fatal internal error."),
			gettext_noop("Allows an opportunity to debug the backend process before it terminates."),
			GUC_NOT_IN_SAMPLE | GUC_NO_RESET_ALL | GUC_UNIT_S | GUC_GPDB_ADDOPT
		},
		&gp_debug_linger,
		0, 0, 3600, NULL, NULL
#endif
	},

	{
		{"gp_segment", PGC_BACKEND, GP_WORKER_IDENTITY,
			gettext_noop("Segment id of the segment db which is local to this worker process."),
			gettext_noop("-1 for a session's entry process (qDisp) or a worker on the entry db."),
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE
		},
		&Gp_segment,
		-999, INT_MIN, INT_MAX, NULL, NULL
	},

	{
		{"gp_qd_port", PGC_BACKEND, GP_WORKER_IDENTITY,
			gettext_noop("Shows the Master Postmaster port."),
			gettext_noop("0 for a session's entry process (qDisp)"),
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE
		},
		&qdPostmasterPort,
		0, INT_MIN, INT_MAX, NULL, NULL
	},


	{
		{"gp_sort_flags", PGC_USERSET, QUERY_TUNING_OTHER,
			gettext_noop("Experimental feature: Generic sort flags."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&gp_sort_flags,
		10000, 0, INT_MAX, NULL, NULL
	},

	{
		{"gp_sort_max_distinct", PGC_USERSET, QUERY_TUNING_OTHER,
			gettext_noop("Experimental feature: max number of distinct values for sort."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&gp_sort_max_distinct,
		20000, 0, INT_MAX, NULL, NULL
	},

	{
		{"gp_interconnect_setup_timeout", PGC_USERSET, GP_ARRAY_TUNING,
			gettext_noop("Timeout (in seconds) on interconnect setup that occurs at query start"),
			gettext_noop("Used by Interconnect to timeout the setup of the communication fabric."),
			GUC_UNIT_S | GUC_GPDB_ADDOPT
		},
		&interconnect_setup_timeout,
		7200, 0, 7200, NULL, NULL
	},

	{
		{"gp_snapshotadd_timeout", PGC_USERSET, GP_ARRAY_TUNING,
			gettext_noop("Timeout (in seconds) on setup of new connection snapshot"),
			gettext_noop("Used by the transaction manager."),
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE | GUC_UNIT_S | GUC_GPDB_ADDOPT
		},
		&gp_snapshotadd_timeout,
		10, 0, INT_MAX, NULL, NULL
	},

	{
		{"gp_segment_connect_timeout", PGC_USERSET, GP_ARRAY_TUNING,
			gettext_noop("Maximum time (in seconds) allowed for a new worker process to start or a mirror to respond."),
			gettext_noop("0 indicates 'wait forever'."),
			GUC_UNIT_S
		},
		&gp_segment_connect_timeout,
		180, 0, INT_MAX, NULL, NULL
	},

	{
		{"verify_checkpoint_interval", PGC_POSTMASTER, DEVELOPER_OPTIONS,
			gettext_noop("set the online verification checkpoint interval (seconds)"),
			gettext_noop("0 means do not checkpoint"),
			GUC_UNIT_S | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&verify_checkpoint_interval,
		VERIFY_CHECKPOINT_INTERVAL_DEFAULT, 0, 1800, NULL, NULL
	},

	{
		{"gp_fts_probe_retries", PGC_POSTMASTER, GP_ARRAY_TUNING,
			gettext_noop("Number of retries for FTS to complete probing a segment."),
			gettext_noop("Used by the fts-probe process."),
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&gp_fts_probe_retries,
		5, 0, 100, NULL, NULL
	},

	{
		{"gp_fts_probe_timeout", PGC_USERSET, GP_ARRAY_TUNING,
			gettext_noop("Maximum time (in seconds) allowed for FTS to complete probing a segment."),
			gettext_noop("Used by the fts-probe process."),
			GUC_UNIT_S
		},
		&gp_fts_probe_timeout,
3967
		20, 0, 3600, NULL, NULL
3968 3969 3970 3971 3972 3973 3974 3975 3976
	},

	{
		{"gp_fts_probe_interval", PGC_POSTMASTER, GP_ARRAY_TUNING,
			gettext_noop("A complete probe of all segments starts each time a timer with this period expires."),
			gettext_noop("Used by the fts-probe process. "),
			GUC_UNIT_S
		},
		&gp_fts_probe_interval,
3977
		60, 10, 3600, NULL, NULL
3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101
	},

	{
		{"gp_fts_probe_threadcount", PGC_POSTMASTER, GP_ARRAY_TUNING,
			gettext_noop("Use this number of threads for probing the segments."),
			gettext_noop("The number of threads to create at each probe interval expiration."),
			GUC_NOT_IN_SAMPLE
		},
		&gp_fts_probe_threadcount,
		16, 1, 128, NULL, NULL
	},

	{
		{"gp_fts_transition_retries", PGC_POSTMASTER, GP_ARRAY_TUNING,
			gettext_noop("The number of retries for FTS to request a segment state transition."),
			NULL,
			GUC_NOT_IN_SAMPLE | GUC_NO_SHOW_ALL
		},
		&gp_fts_transition_retries,
		5, 1, 100, NULL, NULL
	},

	{
		{"gp_fts_transition_timeout", PGC_POSTMASTER, GP_ARRAY_TUNING,
			gettext_noop("Timeout (in seconds) for FTS to request a segment state transition."),
			NULL,
			GUC_NOT_IN_SAMPLE | GUC_NO_SHOW_ALL | GUC_UNIT_S
		},
		&gp_fts_transition_timeout,
		3600, 1, 36000, NULL, NULL
	},

	{
		{"gp_gang_creation_retry_count", PGC_USERSET, GP_ARRAY_TUNING,
			gettext_noop("After a gang-creation fails, retry the number of times if failure is retryable."),
			gettext_noop("A value of zero disables retries."),
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&gp_gang_creation_retry_count,
		5, 0, 128, NULL, NULL
	},

	{
		{"gp_gang_creation_retry_timer", PGC_USERSET, GP_ARRAY_TUNING,
			gettext_noop("Wait this many milliseconds between gang-creation-retries."),
			NULL,
			GUC_UNIT_MS | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&gp_gang_creation_retry_timer,
		2000, 100, 120000, NULL, NULL
	},

	{
		{"gp_session_id", PGC_BACKEND, CLIENT_CONN_OTHER,
			gettext_noop("Global ID used to uniquely identify a particular session in an Greenplum Database array"),
			NULL,
			GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE
		},
		&gp_session_id,
		-1, INT_MIN, INT_MAX, NULL, NULL
	},

	{
		{"gp_segments_for_planner", PGC_USERSET, QUERY_TUNING_COST,
			gettext_noop("If >0, number of segment dbs for the planner to assume in its cost and size estimates."),
			gettext_noop("If 0, estimates are based on the actual number of segment dbs.")
		},
		&gp_segments_for_planner,
		0, 0, INT_MAX, NULL, NULL
	},

	{
		{"gp_hashjoin_tuples_per_bucket", PGC_USERSET, GP_ARRAY_TUNING,
			gettext_noop("Target density of hashtable used by Hashjoin during execution"),
			gettext_noop("A smaller value will tend to produce larger hashtables, which increases join performance"),
			GUC_NOT_IN_SAMPLE | GUC_GPDB_ADDOPT
		},
		&gp_hashjoin_tuples_per_bucket,
		5, 1, 25, NULL, NULL
	},

	{
		{"gp_hashjoin_metadata_memory_percent", PGC_USERSET, GP_ARRAY_TUNING,
			gettext_noop("Percentage of the operator memory allowed to store hashtable metadata. Set to 0 for unlimited amount of metadata memory."),
			gettext_noop("A small value can cause certain queries to fail, a large or unbounded value can cause the system to run out of memory"),
			GUC_NOT_IN_SAMPLE | GUC_NO_SHOW_ALL | GUC_GPDB_ADDOPT
		},
		&gp_hashjoin_metadata_memory_percent,
		20, 0, INT_MAX, NULL, NULL
	},

	{
		{"gp_hashagg_groups_per_bucket", PGC_USERSET, GP_ARRAY_TUNING,
			gettext_noop("Target density of hashtable used by Hashagg during execution"),
			gettext_noop("A smaller value will tend to produce larger hashtables, which increases agg performance"),
			GUC_NOT_IN_SAMPLE | GUC_NO_SHOW_ALL | GUC_GPDB_ADDOPT
		},
		&gp_hashagg_groups_per_bucket,
		5, 1, 25, NULL, NULL
	},

	{
		{"gp_hashagg_default_nbatches", PGC_USERSET, QUERY_TUNING_METHOD,
			gettext_noop("Default number of batches for hashagg's (re-)spilling phases"),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE | GUC_GPDB_ADDOPT
		},
		&gp_hashagg_default_nbatches,
		32, 4, 1000000, NULL, NULL
	},

	{
		{"gp_hashjoin_bloomfilter", PGC_USERSET, GP_ARRAY_TUNING,
			gettext_noop("Use bloomfilter in hash join"),
			gettext_noop("Use bloomfilter may speed up hashtable probing"),
			GUC_NOT_IN_SAMPLE | GUC_NO_SHOW_ALL | GUC_GPDB_ADDOPT
		},
		&gp_hashjoin_bloomfilter,
		1, 0, 1, NULL, NULL
	},

	{
		{"gp_motion_slice_noop", PGC_USERSET, GP_ARRAY_TUNING,
			gettext_noop("Make motion nodes in certain slices noop"),
4102
			gettext_noop("Make motion nodes noop, to help analyze performance"),
4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476
			GUC_NOT_IN_SAMPLE | GUC_NO_SHOW_ALL | GUC_GPDB_ADDOPT
		},
		&gp_motion_slice_noop,
		0, 0, INT_MAX, NULL, NULL
	},

#ifdef ENABLE_LTRACE
	{
		{"gp_ltrace_flag", PGC_USERSET, GP_ARRAY_TUNING,
			gettext_noop("Linux Tracing flag"),
			gettext_noop("Linux Tracing flag"),
			GUC_NOT_IN_SAMPLE | GUC_NO_SHOW_ALL | GUC_GPDB_ADDOPT
		},
		&gp_ltrace_flag,
		0, 0, INT_MAX, NULL, NULL
	},
#endif

	{
		{"gp_reject_percent_threshold", PGC_USERSET, GP_ERROR_HANDLING,
			gettext_noop("Reject limit in percent starts calculating after this number of rows processed"),
			NULL
		},
		&gp_reject_percent_threshold,
		300, 0, INT_MAX, NULL, NULL
	},

	{
		{"gp_gpperfmon_send_interval", PGC_USERSET, LOGGING_WHAT,
			gettext_noop("Interval in seconds between sending messages to gpperfmon."),
			NULL,
			GUC_GPDB_ADDOPT
		},
		&gp_gpperfmon_send_interval,
		1, 1, 3600, gpvars_assign_gp_gpperfmon_send_interval, NULL
	},

	{
		{"wal_send_client_timeout", PGC_SIGHUP, GP_ARRAY_TUNING,
			gettext_noop("The time in milliseconds for a backend process to wait on the WAL Send server to finish a request to the QD mirroring standby."),
			NULL,
			GUC_UNIT_MS | GUC_NOT_IN_SAMPLE | GUC_NO_SHOW_ALL
		},
		&WalSendClientTimeout,
		30000, 100, INT_MAX / 1000, NULL, NULL
	},

	{
		{"gpperfmon_port", PGC_POSTMASTER, UNGROUPED,
			gettext_noop("Sets the port number of gpperfmon."),
			NULL,
		},
		&gpperfmon_port,
		8888, 1024, 65535, NULL, NULL
	},

	{
		{"gp_vmem_protect_limit", PGC_POSTMASTER, RESOURCES_MEM,
			gettext_noop("Virtual memory limit (in MB) of Greenplum memory protection."),
			NULL,
		},
		&gp_vmem_protect_limit,
#ifdef __darwin__
		0,
#else
		8192,
#endif
		0, INT_MAX / 2, NULL, NULL
	},

	{
		{"runaway_detector_activation_percent", PGC_POSTMASTER, RESOURCES_MEM,
			gettext_noop("The runaway detector activates if the used vmem exceeds this percentage of the vmem quota. Set to 100 to disable runaway detection."),
			NULL,
		},
		&runaway_detector_activation_percent,
		90, 0, 100, NULL, NULL
	},

	{
		{"gp_vmem_protect_segworker_cache_limit", PGC_POSTMASTER, RESOURCES_MEM,
			gettext_noop("Max virtual memory limit (in MB) for a segworker to be cachable."),
			NULL,
		},
		&gp_vmem_protect_gang_cache_limit,
		500, 1, INT_MAX / 2, NULL, NULL
	},

	{
		{"gp_autostats_on_change_threshold", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Threshold for number of tuples added to table by CTAS or Insert-to to trigger autostats in on_change mode. See gp_autostats_mode."),
			NULL
		},
		&gp_autostats_on_change_threshold,
		INT_MAX, 0, INT_MAX, NULL, NULL
	},

	{
		{"gp_distinct_grouping_sets_threshold", PGC_USERSET, QUERY_TUNING_METHOD,
			gettext_noop("Threshold for the number of grouping sets whose distinct-qualified "
						 "aggregate computation will be rewritten based on the multi-phrase aggregation. "
						 "The rest of grouping sets in the same query will not be rewritten."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&gp_distinct_grouping_sets_threshold,
		32, 0, 1024, NULL, NULL
	},

	{
		{"gp_statistics_blocks_target", PGC_USERSET, STATS_ANALYZE,
			gettext_noop("The number of blocks to be sampled to estimate reltuples/relpages for heap tables."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&gp_statistics_blocks_target,
		25, 1, 1000, NULL, NULL
	},
	{
		{"gp_resqueue_priority_local_interval", PGC_POSTMASTER, RESOURCES_MGM,
			gettext_noop("A measure of how often a backend process must consider backing off."),
			NULL,
			GUC_NO_SHOW_ALL
		},
		&gp_resqueue_priority_local_interval,
		100000, 500, INT_MAX, NULL, NULL
	},
	{
		{"gp_resqueue_priority_sweeper_interval", PGC_POSTMASTER, RESOURCES_MGM,
			gettext_noop("Frequency (in ms) at which sweeper process re-evaluates CPU shares."),
			NULL
		},
		&gp_resqueue_priority_sweeper_interval,
		1000, 500, 15000, NULL, NULL
	},
	{
		{"gp_resqueue_priority_inactivity_timeout", PGC_POSTMASTER, RESOURCES_MGM,
			gettext_noop("If a backend does not report progress in this time (in ms), it is deemed inactive."),
			NULL,
			GUC_NO_SHOW_ALL
		},
		&gp_resqueue_priority_inactivity_timeout,
		2000, 500, INT_MAX, NULL, NULL
	},
	{
		{"gp_resqueue_priority_grouping_timeout", PGC_POSTMASTER, RESOURCES_MGM,
			gettext_noop("A backend gives up on finding a better group leader after this timeout (in ms)."),
			NULL,
			GUC_NO_SHOW_ALL
		},
		&gp_resqueue_priority_grouping_timeout,
		1000, 1000, INT_MAX, NULL, NULL
	},

	{
		{"gp_perfmon_segment_interval", PGC_POSTMASTER, STATS,
			gettext_noop("Interval (in ms) between sending segment statistics to perfmon."),
			NULL,
			GUC_NO_SHOW_ALL
		},
		&gp_perfmon_segment_interval,
		1000, 500, INT_MAX, NULL, NULL
	},

	{
		{"filerep_message_body_length", PGC_POSTMASTER, DEVELOPER_OPTIONS,
			gettext_noop("size (in bytes) for filerep message body."),
			NULL,
			GUC_NO_SHOW_ALL
		},
		&file_rep_message_body_length,
		32768, 32768, 262144, NULL, NULL
	},

	{
		{"filerep_buffer_size", PGC_POSTMASTER, DEVELOPER_OPTIONS,
			gettext_noop("size (in bytes) for filerep shared memory"),
			NULL,
			GUC_NO_SHOW_ALL
		},
		&file_rep_buffer_size,
		2097152, 1048576, 16777216, NULL, NULL
	},

	{
		{"filerep_ack_buffer_size", PGC_POSTMASTER, DEVELOPER_OPTIONS,
			gettext_noop("size (in bytes) for filerep ack shared memory"),
			NULL,
			GUC_NO_SHOW_ALL
		},
		&file_rep_ack_buffer_size,
		524288, 131072, 1048576, NULL, NULL
	},

	{
		{"filerep_min_data_before_flush", PGC_POSTMASTER, DEVELOPER_OPTIONS,
			gettext_noop("size (in bytes) that a filerep buffer must reach before the client flushes the data"),
			NULL,
			GUC_NO_SHOW_ALL
		},
		&file_rep_min_data_before_flush,
		128 * 1024, 8 * 1024, 16 * 1024 * 1024, NULL, NULL
	},

	{
		{"filerep_socket_timeout", PGC_POSTMASTER, DEVELOPER_OPTIONS,
			gettext_noop("Timeout (in seconds) if we cannot write to socket (the socket is blocking)"),
			NULL,
			GUC_NO_SHOW_ALL
		},
		&file_rep_socket_timeout,
		10, 0, 300, NULL, NULL
	},

	{
		{"gp_blockdirectory_entry_min_range", PGC_USERSET, GP_ARRAY_TUNING,
			gettext_noop("Minimal range in bytes one block directory entry covers."),
			gettext_noop("Used to reduce the size of a block directory."),
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE | GUC_GPDB_ADDOPT
		},
		&gp_blockdirectory_entry_min_range,
		0, 0, INT_MAX, NULL, NULL
	},

	{
		{"gp_blockdirectory_minipage_size", PGC_USERSET, GP_ARRAY_TUNING,
			gettext_noop("Number of entries one row in a block directory table contains."),
			gettext_noop("Use smaller value in non-bulk load cases."),
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE | GUC_GPDB_ADDOPT
		},
		&gp_blockdirectory_minipage_size,
		NUM_MINIPAGE_ENTRIES, 1, NUM_MINIPAGE_ENTRIES, NULL, NULL
	},


	{
		{"gp_segworker_relative_priority", PGC_POSTMASTER, RESOURCES_MGM,
			gettext_noop("Priority for the segworkers relative to the postmaster's priority."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&gp_segworker_relative_priority,
		PRIO_MAX,
		0, PRIO_MAX, NULL, NULL
	},

	{
		{"gp_workfile_bytes_to_checksum", PGC_USERSET, GP_ARRAY_TUNING,
			gettext_noop("The number of bytes to be checksummed in every WORKFILE_SAFEWRITE_SIZE bytes."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE | GUC_GPDB_ADDOPT
		},
		&gp_workfile_bytes_to_checksum,
		16, 0, WORKFILE_SAFEWRITE_SIZE, NULL, NULL
	},

	/* for pljava */
	{
		{"pljava_statement_cache_size", PGC_SUSET, CUSTOM_OPTIONS,
			gettext_noop("Size of the prepared statement MRU cache"),
			NULL,
			GUC_GPDB_ADDOPT | GUC_NOT_IN_SAMPLE | GUC_SUPERUSER_ONLY
		},
		&pljava_statement_cache_size,
		0, 0, 512, NULL, NULL
	},

	/* for SimEx */
	{
		{"gp_simex_class", PGC_POSTMASTER, GP_ERROR_HANDLING,
			gettext_noop("Simulated Exceptional Situation class."),
			gettext_noop("Sets the ES class to be simulated. Default value is 0 (Out-Of-Memory)."),
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&gp_simex_class,
		0, 0, INT_MAX, NULL, NULL
	},

	{
		{"gp_test_time_slice_interval", PGC_USERSET, GP_ERROR_HANDLING,
			gettext_noop("Maximum interval in ms between successive checks for interrupts."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE | GUC_GPDB_ADDOPT
		},
		&gp_test_time_slice_interval,
		1000, 1, 10000, NULL, NULL
	},

	{
		{"gp_resqueue_memory_policy_auto_fixed_mem", PGC_USERSET, RESOURCES_MEM,
			gettext_noop("Sets the fixed amount of memory reserved for non-memory intensive operators in the AUTO policy."),
			NULL,
			GUC_UNIT_KB | GUC_GPDB_ADDOPT | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&gp_resqueue_memory_policy_auto_fixed_mem,
		100, 50, INT_MAX, NULL, NULL
	},

	{
		{"gp_backup_directIO_read_chunk_mb", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Size of read Chunk buffer in directIO dump (in MB)"),
			NULL,
		},
		&gp_backup_directIO_read_chunk_mb,
		20, 1, 200, NULL, NULL
	},

	{
		{"gp_email_connect_timeout", PGC_SUSET, LOGGING,
			gettext_noop("Sets the amount of time (in secs) after which SMTP sockets would timeout"),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NOT_IN_SAMPLE
		},
		&gp_email_connect_timeout,
		15, 10, 120, NULL, NULL
	},
	{
		{"gp_email_connect_failures", PGC_SUSET, LOGGING,
			gettext_noop("Sets the number of consecutive connect failures before declaring SMTP server as unavailable"),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NOT_IN_SAMPLE
		},
		&gp_email_connect_failures,
		5, 3, 100, NULL, NULL
	},
	{
		{"gp_email_connect_avoid_duration", PGC_SUSET, LOGGING,
			gettext_noop("Sets the amount of time (in secs) to avoid connecting to SMTP server"),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NOT_IN_SAMPLE
		},
		&gp_email_connect_avoid_duration,
		7200, 300, 86400, NULL, NULL
	},

	{
		{"optimizer_plan_id", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Choose a plan alternative"),
			NULL,
			GUC_GPDB_ADDOPT | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_plan_id,
		0, 0, INT_MAX, NULL, NULL
	},

	{
		{"optimizer_samples_number", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Set the number of plan samples"),
			NULL,
			GUC_GPDB_ADDOPT | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_samples_number,
		1000, 1, INT_MAX, NULL, NULL
	},

	{
		{"optimizer_cte_inlining_bound", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Set the CTE inlining cutoff"),
			NULL,
			GUC_GPDB_ADDOPT | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_cte_inlining_bound,
		0, 0, INT_MAX, NULL, NULL
	},

	{
		{"optimizer_segments", PGC_USERSET, QUERY_TUNING_METHOD,
			gettext_noop("Number of segments to be considered by the optimizer during costing, or 0 to take the actual number of segments."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_segments,
		0, 0, INT_MAX, NULL, NULL
	},
4477

4478 4479 4480 4481 4482 4483 4484 4485 4486 4487
	{
		{"optimizer_array_expansion_threshold", PGC_USERSET, QUERY_TUNING_METHOD,
			gettext_noop("Item limit for expansion of arrays in WHERE clause to disjunctive form."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_array_expansion_threshold,
		25, 0, INT_MAX, NULL, NULL
	},

4488 4489 4490 4491 4492 4493 4494 4495 4496
	{
		{"optimizer_join_order_threshold", PGC_USERSET, QUERY_TUNING_METHOD,
			gettext_noop("Maximum number of join children to use dynamic programming based join ordering algorithm."),
			NULL
		},
		&optimizer_join_order_threshold,
		10, 0, INT_MAX, NULL, NULL
	},

4497 4498 4499 4500 4501 4502 4503 4504 4505 4506
	{
		{"optimizer_join_arity_for_associativity_commutativity", PGC_USERSET, QUERY_TUNING_METHOD,
			gettext_noop("Maximum number of children n-ary-join have without disabling commutativity and associativity transform"),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_join_arity_for_associativity_commutativity,
		INT_MAX, 0, INT_MAX, NULL, NULL
	},

4507 4508 4509 4510 4511 4512 4513 4514 4515 4516
	{
		{"optimizer_penalize_broadcast_threshold", PGC_USERSET, QUERY_TUNING_METHOD,
			gettext_noop("Maximum number of rows of a relation that can be broadcasted without penalty."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_penalize_broadcast_threshold,
		10000000, 0, INT_MAX, NULL, NULL
	},

4517 4518 4519 4520 4521 4522 4523 4524 4525 4526
	{
		{"optimizer_mdcache_size", PGC_USERSET, RESOURCES_MEM,
			gettext_noop("Sets the size of MDCache."),
			NULL,
			GUC_UNIT_KB | GUC_GPDB_ADDOPT
		},
		&optimizer_mdcache_size,
		0, 0, INT_MAX, NULL, NULL
	},

4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566
	{
		{"memory_profiler_dataset_size", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Set the size in GB"),
			NULL,
			GUC_GPDB_ADDOPT | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&memory_profiler_dataset_size,
		0, 0, INT_MAX, NULL, NULL
	},
	{
		{"repl_catchup_within_range", PGC_SUSET, WAL_REPLICATION,
			gettext_noop("Sets the maximum number of xlog segments allowed to lag"
					  " when the backends can start blocking despite the WAL"
					   " sender being in catchup phase. (Master Mirroring)"),
			NULL,
			GUC_SUPERUSER_ONLY
		},
		&repl_catchup_within_range,
		1, 0, XLogSegsPerFile, NULL, NULL
	},
	{
		{"gp_initial_bad_row_limit", PGC_USERSET, EXTERNAL_TABLES,
			gettext_noop("Stops processing when number of the first bad rows exceeding this value"),
			NULL,
			GUC_GPDB_ADDOPT
		},
		&gp_initial_bad_row_limit,
		1000, 0, INT_MAX, NULL, NULL
	},

	{
		{"log_count_recovered_files_batch", PGC_POSTMASTER, DEVELOPER_OPTIONS,
			gettext_noop("Logs the total number of files shipped to the mirror after every batch of size specified by this value"),
			NULL,
			GUC_NOT_IN_SAMPLE,
		},
		&log_count_recovered_files_batch,
		1000, 0, INT_MAX, NULL, NULL
	},

4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586
	{
		{"gp_indexcheck_insert", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Validate that a unique index does not already have the new tid during insert."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE | GUC_GPDB_ADDOPT
		},
		(int *) &gp_indexcheck_insert,
		INDEX_CHECK_NONE, 0, INDEX_CHECK_ALL, NULL, NULL
	},

	{
		{"gp_indexcheck_vacuum", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Validate index after lazy vacuum."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE | GUC_GPDB_ADDOPT
		},
		(int *) &gp_indexcheck_vacuum,
		INDEX_CHECK_NONE, 0, INDEX_CHECK_ALL, NULL, NULL
	},

4587 4588 4589 4590 4591 4592 4593
	{
		{"codegen_varlen_tolerance", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Minimum number of initial fixed length attributes in the table to generate code for deforming tuples."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE | GUC_GPDB_ADDOPT
		},
		&codegen_varlen_tolerance,
4594 4595 4596 4597 4598 4599
#ifdef USE_CODEGEN
		5,
#else
		0,
#endif
		0, INT_MAX, NULL, NULL
4600 4601
	},

4602 4603 4604 4605 4606 4607 4608 4609 4610 4611
	{
		{"dtx_phase2_retry_count", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Maximum number of retries during two phase commit after which master PANICs."),
			NULL,
			GUC_SUPERUSER_ONLY |  GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE | GUC_GPDB_ADDOPT
		},
		&dtx_phase2_retry_count,
		2, 0, 10, NULL, NULL
	},

4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622
	{
		/* Can't be set in postgresql.conf */
		{"gp_server_version_num", PGC_INTERNAL, PRESET_OPTIONS,
			gettext_noop("Shows the Greenplum server version as an integer."),
			NULL,
			GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE
		},
		&gp_server_version_num,
		GP_VERSION_NUM, GP_VERSION_NUM, GP_VERSION_NUM, NULL, NULL
	},

4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699
	/* End-of-list marker */
	{
		{NULL, 0, 0, NULL, NULL}, NULL, 0, 0, 0, NULL, NULL
	}
};

struct config_real ConfigureNamesReal_gp[] =
{
	{
		{"cursor_tuple_fraction", PGC_USERSET, QUERY_TUNING_OTHER,
			gettext_noop("Sets the planner's estimate of the fraction of "
						 "a cursor's rows that will be retrieved."),
			NULL
		},
		&cursor_tuple_fraction,
		DEFAULT_CURSOR_TUPLE_FRACTION, 0.0, 1.0, NULL, NULL
	},

	{
		{"gp_workfile_limit_per_segment", PGC_POSTMASTER, RESOURCES,
			gettext_noop("Maximum disk space (in KB) used for workfiles per segment."),
			gettext_noop("0 for no limit. Current query is terminated when limit is exceeded."),
			GUC_UNIT_KB
		},
		&gp_workfile_limit_per_segment,
		0, 0, SIZE_MAX / 1024, NULL, NULL,
	},

	{
		{"gp_workfile_limit_per_query", PGC_USERSET, RESOURCES,
			gettext_noop("Maximum disk space (in KB) used for workfiles per query per segment."),
			gettext_noop("0 for no limit. Current query is terminated when limit is exceeded."),
			GUC_GPDB_ADDOPT | GUC_UNIT_KB
		},
		&gp_workfile_limit_per_query,
		0, 0, SIZE_MAX / 1024, NULL, NULL,
	},

	{
		{"gp_motion_cost_per_row", PGC_USERSET, QUERY_TUNING_COST,
			gettext_noop("Sets the planner's estimate of the cost of "
						 "moving a row between worker processes."),
			gettext_noop("If >0, the planner uses this value -- instead of double the "
					"cpu_tuple_cost -- for Motion operator cost estimation.")
		},
		&gp_motion_cost_per_row,
		0, 0, DBL_MAX, NULL, NULL
	},

	{
		{"gp_analyze_relative_error", PGC_USERSET, STATS_ANALYZE,
			gettext_noop("target relative error fraction for row sampling during analyze"),
			NULL
		},
		&analyze_relative_error,
		0.25, 0, 1.0, NULL, NULL
	},

	{
		{"gp_selectivity_damping_factor", PGC_USERSET, QUERY_TUNING_METHOD,
			gettext_noop("Factor used in selectivity damping."),
			gettext_noop("Values 1..N, 1 = basic damping, greater values emphasize damping"),
			GUC_NOT_IN_SAMPLE | GUC_NO_SHOW_ALL
		},
		&gp_selectivity_damping_factor,
		1.0, 1.0, DBL_MAX, NULL, NULL
	},

	{
		{"gp_statistics_ndistinct_scaling_ratio_threshold", PGC_USERSET, STATS_ANALYZE,
			gettext_noop("If the ratio of number of distinct values of an attribute to the number of rows is greater than this value, it is assumed that ndistinct will scale with table size."),
			NULL,
			GUC_NOT_IN_SAMPLE | GUC_NO_SHOW_ALL
		},
		&gp_statistics_ndistinct_scaling_ratio_threshold,
		0.10, 0.001, 1.0, NULL, NULL
	},
4700

4701 4702 4703 4704 4705 4706 4707 4708 4709
	{
		{"gp_statistics_sampling_threshold", PGC_USERSET, STATS_ANALYZE,
			gettext_noop("Only tables larger than this size will be sampled."),
			NULL,
			GUC_NOT_IN_SAMPLE | GUC_NO_SHOW_ALL
		},
		&gp_statistics_sampling_threshold,
		20000.0, 0.0, DBL_MAX, NULL, NULL
	},
4710

4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778
	{
		{"gp_resqueue_priority_cpucores_per_segment", PGC_POSTMASTER, RESOURCES_MGM,
			gettext_noop("Number of processing units associated with a segment."),
			NULL
		},
		&gp_resqueue_priority_cpucores_per_segment,
		4.0, 0.1, 512.0, NULL, NULL
	},

	{
		{"gp_simex_rand", PGC_USERSET, GP_ERROR_HANDLING,
			gettext_noop("Propability of injecting an Exceptional Situation in SimEx."),
			gettext_noop("Controls randomized ES simulation."),
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE | GUC_GPDB_ADDOPT
		},
		&gp_simex_rand,
		100.0, 0.001, 100.0, NULL, NULL
	},

	{
		{"optimizer_damping_factor_filter", PGC_USERSET, QUERY_TUNING_METHOD,
			gettext_noop("select predicate damping factor in optimizer, 1.0 means no damping"),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_damping_factor_filter,
		0.75, 0.0, 1.0, NULL, NULL
	},

	{
		{"optimizer_damping_factor_join", PGC_USERSET, QUERY_TUNING_METHOD,
			gettext_noop("join predicate damping factor in optimizer, 1.0 means no damping"),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_damping_factor_join,
		0.01, 0.0, 1.0, NULL, NULL
	},
	{
		{"optimizer_damping_factor_groupby", PGC_USERSET, QUERY_TUNING_METHOD,
			gettext_noop("groupby operator damping factor in optimizer, 1.0 means no damping"),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_damping_factor_groupby,
		0.75, 0.0, 1.0, NULL, NULL
	},

	{
		{"optimizer_cost_threshold", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("set the threshold for plan smapling relative to the cost of best plan, 0.0 means unbounded"),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_cost_threshold,
		0.0, 0.0, INT_MAX, NULL, NULL
	},

	{
		{"optimizer_nestloop_factor", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("set the nestloop join cost factor in the optimizer"),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_nestloop_factor,
		1024.0, 1.0, DBL_MAX, NULL, NULL
	},

4779 4780 4781 4782 4783 4784 4785 4786 4787 4788
	{
		{"optimizer_sort_factor",PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("set the sort cost factor in the optimizer, 1.0 means same as default, > 1.0 means more costly than default, < 1.0 means means less costly than default"),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_sort_factor,
		1.0, 0.0, DBL_MAX, NULL, NULL
	},

4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905
	/* End-of-list marker */
	{
		{NULL, 0, 0, NULL, NULL}, NULL, 0.0, 0.0, 0.0, NULL, NULL
	}
};

struct config_string ConfigureNamesString_gp[] =
{
	{
		{"gp_workfile_compress_algorithm", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Specify the compression algorithm that work files in the query executor use."),
			gettext_noop("Valid values are \"NONE\", \"ZLIB\"."),
			GUC_GPDB_ADDOPT
		},
		&gp_workfile_compress_algorithm_str,
		"none", assign_gp_workfile_compress_algorithm, NULL
	},

	{
		{"gp_workfile_type_hashjoin", PGC_USERSET, QUERY_TUNING_OTHER,
			gettext_noop("Specify the type of work files to use for executing hash join plans."),
			gettext_noop("Valid values are \"BFZ\", \"BUFFILE\"."),
			GUC_GPDB_ADDOPT | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&gp_workfile_type_hashjoin_str,
		"bfz", assign_gp_workfile_type_hashjoin, NULL
	},

	{
		{"gpperfmon_log_alert_level", PGC_USERSET, LOGGING,
			gettext_noop("Specify the log alert level used by gpperfmon."),
			gettext_noop("Valid values are 'none', 'warning', 'error', 'fatal', 'panic'.")
		},
		&gpperfmon_log_alert_level_str,
		"none", gpvars_assign_gp_gpperfmon_log_alert_level, gpvars_show_gp_gpperfmon_log_alert_level
	},

	{
		{"explain_memory_verbosity", PGC_USERSET, RESOURCES_MEM,
			gettext_noop("Experimental feature: show memory account usage in EXPLAIN ANALYZE."),
			gettext_noop("Valid values are SUPPRESS, SUMMARY, and DETAIL."),
			GUC_GPDB_ADDOPT
		},
		&explain_memory_verbosity_str,
		"suppress", assign_explain_memory_verbosity, NULL
	},

	{
		{"memory_profiler_run_id", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Set the unique run ID for memory profiling"),
			gettext_noop("Any string is acceptable"),
			GUC_GPDB_ADDOPT | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&memory_profiler_run_id,
		"none", NULL, NULL
	},

	{
		{"memory_profiler_dataset_id", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Set the dataset ID for memory profiling"),
			gettext_noop("Any string is acceptable"),
			GUC_GPDB_ADDOPT | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&memory_profiler_dataset_id,
		"none", NULL, NULL
	},

	{
		{"memory_profiler_query_id", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Set the query ID for memory profiling"),
			gettext_noop("Any string is acceptable"),
			GUC_GPDB_ADDOPT | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&memory_profiler_query_id,
		"none", NULL, NULL
	},

	{
		{"optimizer_log_failure", PGC_USERSET, LOGGING_WHEN,
			gettext_noop("Sets which optimizer failures are logged."),
			gettext_noop("Valid values are unexpected, expected, all"),
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_log_failure_str,
		"all", assign_optimizer_log_failure, NULL
	},

	{
		{"optimizer_minidump", PGC_USERSET, LOGGING_WHEN,
			gettext_noop("Generate optimizer minidump."),
			gettext_noop("Valid values are onerror, always"),
		},
		&optimizer_minidump_str,
		"onerror", assign_optimizer_minidump, NULL
	},

	{
		{"optimizer_cost_model", PGC_USERSET, LOGGING_WHEN,
			gettext_noop("Set optimizer cost model."),
			gettext_noop("Valid values are legacy, calibrated"),
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_cost_model_str,
		"calibrated", assign_optimizer_cost_model, NULL
	},
	{
		{"gp_workfile_caching_loglevel", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Sets the logging level for workfile caching debugging messages"),
			gettext_noop("Valid values are DEBUG5, DEBUG4, DEBUG3, DEBUG2, "
						 "DEBUG1, LOG, NOTICE, WARNING, and ERROR. Each level includes all the "
						 "levels that follow it. The later the level, the fewer messages are "
						 "sent."),
			GUC_GPDB_ADDOPT | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&gp_workfile_caching_loglevel_str,
		"debug1", assign_gp_workfile_caching_loglevel, NULL
	},
4906

4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028
	{
		{"gp_sessionstate_loglevel", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Sets the logging level for session state debugging messages"),
			gettext_noop("Valid values are DEBUG5, DEBUG4, DEBUG3, DEBUG2, "
						 "DEBUG1, LOG, NOTICE, WARNING, and ERROR. Each level includes all the "
						 "levels that follow it. The later the level, the fewer messages are "
						 "sent."),
			GUC_GPDB_ADDOPT | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&gp_sessionstate_loglevel_str,
		"debug1", assign_gp_sessionstate_loglevel, NULL
	},

	{
		{"debug_persistent_print_level", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Sets the persistent relation debug message levels that are logged."),
			gettext_noop("Valid values are DEBUG5, DEBUG4, DEBUG3, DEBUG2, DEBUG1, "
			"INFO, NOTICE, WARNING, ERROR, LOG, FATAL, and PANIC. Each level "
						 "includes all the levels that follow it."),
			GUC_GPDB_ADDOPT | GUC_NO_SHOW_ALL
		},
		&Debug_persistent_print_level_str,
		"debug1", assign_debug_persistent_print_level, NULL
	},

	{
		{"debug_persistent_recovery_print_level", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Sets the persistent recovery debug message levels that are logged."),
			gettext_noop("Valid values are DEBUG5, DEBUG4, DEBUG3, DEBUG2, DEBUG1, "
			"INFO, NOTICE, WARNING, ERROR, LOG, FATAL, and PANIC. Each level "
						 "includes all the levels that follow it."),
			GUC_GPDB_ADDOPT | GUC_NO_SHOW_ALL
		},
		&Debug_persistent_recovery_print_level_str,
		"debug1", assign_debug_persistent_recovery_print_level, NULL
	},

	{
		{"debug_persistent_store_print_level", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Sets the persistent relation store debug message levels that are logged."),
			gettext_noop("Valid values are DEBUG5, DEBUG4, DEBUG3, DEBUG2, DEBUG1, "
			"INFO, NOTICE, WARNING, ERROR, LOG, FATAL, and PANIC. Each level "
						 "includes all the levels that follow it."),
			GUC_GPDB_ADDOPT | GUC_NO_SHOW_ALL
		},
		&Debug_persistent_store_print_level_str,
		"debug1", assign_debug_persistent_store_print_level, NULL
	},

	{
		{"debug_database_command_error_level", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Sets the database command debug message levels that are logged."),
			gettext_noop("Valid values are DEBUG5, DEBUG4, DEBUG3, DEBUG2, DEBUG1, "
			"INFO, NOTICE, WARNING, ERROR, LOG, FATAL, and PANIC. Each level "
						 "includes all the levels that follow it."),
			GUC_GPDB_ADDOPT | GUC_NO_SHOW_ALL
		},
		&Debug_database_command_print_level_str,
		"log", assign_debug_database_command_print_level, NULL
	},

	{
		{"gp_session_role", PGC_BACKEND, GP_WORKER_IDENTITY,
			gettext_noop("Reports the default role for the session."),
			gettext_noop("Valid values are DISPATCH, EXECUTE, and UTILITY."),
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE
		},
		&gp_session_role_string,
		"dispatch", assign_gp_session_role, show_gp_session_role
	},

	{
		{"gp_role", PGC_SUSET, CLIENT_CONN_OTHER,
			gettext_noop("Sets the role for the session."),
			gettext_noop("Valid values are DISPATCH, EXECUTE, and UTILITY."),
			GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE
		},
		&gp_role_string,
		"dispatch", assign_gp_role, show_gp_role
	},

	{
		{"gp_fault_action", PGC_POSTMASTER, DEFUNCT_OPTIONS,
			gettext_noop("Sets the fault action for fault tolerance management."),
			gettext_noop("Valid values are CONTINUE, READONLY, and SHUTDOWN."),
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&gp_fault_action_string,
		"continue", NULL, NULL
	},

	{
		{"gp_log_gang", PGC_USERSET, LOGGING_WHAT,
			gettext_noop("Sets the verbosity of logged messages pertaining to worker process creation and management."),
			gettext_noop("Valid values are \"off\", \"terse\", \"verbose\" and \"debug\"."),
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&gp_log_gang_str,
		"terse", gpvars_assign_gp_log_gang, gpvars_show_gp_log_gang
	},

	{
		{"gp_log_fts", PGC_SIGHUP, LOGGING_WHAT,
			gettext_noop("Sets the verbosity of logged messages pertaining to fault probing."),
			gettext_noop("Valid values are \"off\", \"terse\", \"verbose\" and \"debug\"."),
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&gp_log_fts_str,
		"terse", gpvars_assign_gp_log_fts, gpvars_show_gp_log_fts
	},

	{
		{"gp_log_interconnect", PGC_USERSET, LOGGING_WHAT,
			gettext_noop("Sets the verbosity of logged messages pertaining to connections between worker processes."),
			gettext_noop("Valid values are \"off\", \"terse\", \"verbose\" and \"debug\"."),
			GUC_GPDB_ADDOPT | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&gp_log_interconnect_str,
		"terse", gpvars_assign_gp_log_interconnect, gpvars_show_gp_log_interconnect
	},

	{
5029
		{"gp_interconnect_type", PGC_USERSET, GP_ARRAY_TUNING,
5030
			gettext_noop("Sets the protocol used for inter-node communication."),
5031 5032
			gettext_noop("Only support \"udpifc\" for now."),
			GUC_GPDB_ADDOPT | GUC_NO_SHOW_ALL | GUC_DISALLOW_IN_FILE
5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122
		},
		&gp_interconnect_type_str,
		"udpifc", gpvars_assign_gp_interconnect_type, gpvars_show_gp_interconnect_type
	},

	{
		{"gp_interconnect_fc_method", PGC_USERSET, GP_ARRAY_TUNING,
			gettext_noop("Sets the flow control method used for UDP interconnect."),
			gettext_noop("Valid values are \"capacity\" and \"loss\"."),
			GUC_GPDB_ADDOPT
		},
		&gp_interconnect_fc_method_str,
		"loss", gpvars_assign_gp_interconnect_fc_method, gpvars_show_gp_interconnect_fc_method
	},

	{
		{"gp_qd_hostname", PGC_BACKEND, GP_WORKER_IDENTITY,
			gettext_noop("Shows the QD Hostname. Blank when run on the QD"),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE
		},
		&qdHostname,
		"", NULL, NULL
	},

	{
		{"debug_dtm_action", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Sets the debug DTM action."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&Debug_dtm_action_str,
		"none", assign_debug_dtm_action, NULL
	},

	{
		{"debug_dtm_action_target", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Sets the debug DTM action target."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&Debug_dtm_action_target_str,
		"none", assign_debug_dtm_action_target, NULL
	},

	{
		{"debug_dtm_action_protocol", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Sets the debug DTM action protocol."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&Debug_dtm_action_protocol_str,
		"none", assign_debug_dtm_action_protocol, NULL
	},

	{
		{"debug_dtm_action_sql_command_tag", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Sets the debug DTM action sql command tag."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&Debug_dtm_action_sql_command_tag,
		"", NULL, NULL
	},
	{
		{"gp_autostats_mode", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Sets the autostats mode."),
			gettext_noop("Valid values are NONE, ON_CHANGE, ON_NO_STATS. ON_CHANGE requires setting gp_autostats_on_change_threshold.")
		},
		&gp_autostats_mode_string,
		"none", gpvars_assign_gp_autostats_mode, gpvars_show_gp_autostats_mode
	},
	{
		{"gp_autostats_mode_in_functions", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Sets the autostats mode for statements in procedural language functions."),
			gettext_noop("Valid values are NONE, ON_CHANGE, ON_NO_STATS. ON_CHANGE requires setting gp_autostats_on_change_threshold.")
		},
		&gp_autostats_mode_in_functions_string,
		"none", gpvars_assign_gp_autostats_mode_in_functions, gpvars_show_gp_autostats_mode_in_functions
	},
	{
		{"gp_resqueue_priority_default_value", PGC_POSTMASTER, RESOURCES_MGM,
			gettext_noop("Default weight when one cannot be associated with a statement."),
			NULL,
			GUC_NO_SHOW_ALL
		},
		&gp_resqueue_priority_default_value,
		"MEDIUM", gpvars_assign_gp_resqueue_priority_default_value, NULL
	},

5123 5124 5125 5126 5127 5128 5129 5130
	{
		{"gp_resource_manager", PGC_POSTMASTER, RESOURCES,
			gettext_noop("Sets the type of resource manager."),
			gettext_noop("Only support \"queue\" and \"group\" for now.")
		},
		&gp_resource_manager_str,
		"queue", gpvars_assign_gp_resource_manager_policy, gpvars_show_gp_resource_manager_policy,
	},
5131 5132
	{
		{"gp_email_smtp_server", PGC_SUSET, LOGGING,
5133
			gettext_noop("Sets the SMTP server and port used to send email alerts."),
5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159
			NULL,
			GUC_SUPERUSER_ONLY
		},
		&gp_email_smtp_server,
		"localhost:25", NULL, NULL
	},
	{
		{"gp_email_smtp_userid", PGC_SUSET, LOGGING,
			gettext_noop("Sets the userid used for the SMTP server, if required."),
			NULL,
			GUC_SUPERUSER_ONLY
		},
		&gp_email_smtp_userid,
		"", NULL, NULL
	},
	{
		{"gp_email_smtp_password", PGC_SUSET, LOGGING,
			gettext_noop("Sets the password used for the SMTP server, if required."),
			NULL,
			GUC_SUPERUSER_ONLY
		},
		&gp_email_smtp_password,
		"", NULL, NULL
	},
	{
		{"gp_email_from", PGC_SUSET, LOGGING,
5160
			gettext_noop("Sets email address of the sender of email alerts (our email id)."),
5161 5162 5163 5164 5165 5166 5167 5168
			NULL,
			GUC_SUPERUSER_ONLY
		},
		&gp_email_from,
		"", NULL, NULL
	},
	{
		{"gp_email_to", PGC_SUSET, LOGGING,
5169
			gettext_noop("Sets email address(es) to send alerts to.  May be multiple email addresses separated by semi-colon."),
5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242
			NULL,
			GUC_SUPERUSER_ONLY | GUC_LIST_INPUT
		},
		&gp_email_to,
		"", NULL, NULL
	},

#if USE_SNMP
	{
		{"gp_snmp_community", PGC_SUSET, LOGGING,
			gettext_noop("Sets SNMP community name to send alerts (inform or trap messages) to."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_LIST_INPUT
		},
		&gp_snmp_community,
		"public", NULL, NULL
	},
	{
		{"gp_snmp_monitor_address", PGC_SUSET, LOGGING,
			gettext_noop("Sets the network address to send SNMP alerts (inform or trap messages) to."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_LIST_INPUT
		},
		&gp_snmp_monitor_address,
		"", NULL, NULL
	},
	{
		{"gp_snmp_use_inform_or_trap", PGC_SUSET, LOGGING,
			gettext_noop("If 'inform', we send alerts as SNMP v2c inform messages, if 'trap', we use SNMP v2 trap messages.."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_LIST_INPUT
		},
		&gp_snmp_use_inform_or_trap,
		"trap", NULL, NULL
	},
	{
		{"gp_snmp_debug_log", PGC_SUSET, DEVELOPER_OPTIONS,
			gettext_noop("Logs snmp activity to this file for debugging purposes."),
			NULL,
			GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&gp_snmp_debug_log,
		"", NULL, NULL
	},

#endif

#ifdef USE_CONNECTEMC
	{
		{"gp_connectemc_mode", PGC_POSTMASTER, LOGGING,
			gettext_noop("control connectemc functionality"),
			gettext_noop("If 'on' send connectemc messages and log them locally, if 'local' log connectemc message locally only, if 'remote' send connectemc messages only, if 'off', no connectemc messages"),
			GUC_SUPERUSER_ONLY
		},
		&gp_connectemc_mode,
		"on", assign_connectemc_mode, NULL
	},
#endif

	/* for pljava */
	{
		{"pljava_vmoptions", PGC_SUSET, CUSTOM_OPTIONS,
			gettext_noop("Options sent to the JVM when it is created"),
			NULL,
			GUC_GPDB_ADDOPT | GUC_NOT_IN_SAMPLE | GUC_SUPERUSER_ONLY
		},
		&pljava_vmoptions,
		"", NULL, NULL
	},
	{
		{"pljava_classpath", PGC_SUSET, CUSTOM_OPTIONS,
			gettext_noop("classpath used by the the JVM"),
			NULL,
5243
			GUC_GPDB_ADDOPT | GUC_NOT_IN_SAMPLE 
5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360
		},
		&pljava_classpath,
		"", NULL, NULL
	},

	{
		{"gp_resqueue_memory_policy", PGC_SUSET, RESOURCES_MGM,
			gettext_noop("Sets the policy for memory allocation of queries."),
			gettext_noop("Valid values are NONE, AUTO, EAGER_FREE.")
		},
		&gp_resqueue_memory_policy_str,
		"none", gpvars_assign_gp_resqueue_memory_policy, gpvars_show_gp_resqueue_memory_policy
	},

	{
		{"gp_test_time_slice_report_level", PGC_USERSET, LOGGING_WHEN,
			gettext_noop("Sets the message level for time slice violation reports."),
			gettext_noop("Valid values are NOTICE, WARNING, ERROR, FATAL and PANIC."),
			GUC_GPDB_ADDOPT | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&gp_test_time_slice_report_level_str,
		"error", assign_time_slice_report_level, NULL
	},

	{
		{"gp_test_deadlock_hazard_report_level", PGC_USERSET, LOGGING_WHEN,
			gettext_noop("Sets the message level for deadlock hazard reports."),
			gettext_noop("Valid values are NOTICE, WARNING, ERROR, FATAL and PANIC."),
			GUC_GPDB_ADDOPT | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&gp_test_deadlock_hazard_report_level_str,
		"error", assign_deadlock_hazard_report_level, NULL
	},

	{
		{"gp_test_system_cache_flush_force", PGC_USERSET, GP_ERROR_HANDLING,
			gettext_noop("Force invalidation of system caches on each access"),
			gettext_noop("Valid values are OFF, PLAIN and RECURSIVE."),
			GUC_GPDB_ADDOPT | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&gp_test_system_cache_flush_force_str,
		"off", assign_system_cache_flush_force, NULL
	},

	{
		{"gp_hadoop_connector_jardir", PGC_USERSET, CUSTOM_OPTIONS,
			gettext_noop("The directory of the Hadoop connector JAR, relative to $GPHOME."),
			NULL,
			GUC_GPDB_ADDOPT | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&gp_hadoop_connector_jardir,
		"lib//hadoop", NULL, NULL
	},

	{
		{"gp_hadoop_target_version", PGC_USERSET, CUSTOM_OPTIONS,
			gettext_noop("The distro/version of Hadoop that external table is connecting to."),
			gettext_noop("See release notes or gppkg readme for details."),
			GUC_GPDB_ADDOPT
		},
		&gp_hadoop_target_version,
		"gphd-1.1", NULL, NULL
	},

	{
		{"gp_hadoop_home", PGC_USERSET, CUSTOM_OPTIONS,
			gettext_noop("The location where Hadoop is installed in each segment."),
			NULL,
			GUC_GPDB_ADDOPT
		},
		&gp_hadoop_home,
		"", NULL, NULL
	},

	{
		{"gp_auth_time_override", PGC_SIGHUP, DEVELOPER_OPTIONS,
			gettext_noop("The timestamp used for enforcing time constraints."),
			gettext_noop("For testing purposes only."),
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&gp_auth_time_override_str,
		"", NULL, NULL
	},

	{
		{"password_hash_algorithm", PGC_SUSET, CONN_AUTH_SECURITY,
			gettext_noop("The cryptograph hash algorithm to apply to passwords before storing them."),
			gettext_noop("Valid values are MD5 or SHA-256."),
			GUC_SUPERUSER_ONLY
		},
		&password_hash_algorithm_str,
		"MD5", assign_password_hash_algorithm, NULL
	},

	{
		{"gp_idf_deduplicate", PGC_USERSET, QUERY_TUNING_METHOD,
			gettext_noop("Sets the mode to control inverse distribution function's de-duplicate strategy."),
			gettext_noop("Valid values are AUTO, NONE, and FORCE.")
		},
		&gp_idf_deduplicate_str,
		"auto", assign_gp_idf_deduplicate, NULL
	},

	{
		{"optimizer_search_strategy_path", PGC_USERSET, QUERY_TUNING_METHOD,
			gettext_noop("Sets the search strategy used by gp optimizer."),
			NULL,
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
		},
		&optimizer_search_strategy_path,
		"default", NULL, NULL
	},

	{
		{"gp_default_storage_options", PGC_USERSET, APPENDONLY_TABLES,
			gettext_noop("Default options for appendonly storage."),
			NULL,
5361
			GUC_NOT_IN_SAMPLE | GUC_GPDB_ADDOPT
5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374
		},
		&gp_default_storage_options, "", assign_gp_default_storage_options, NULL
	},

	{
		{"gp_log_format", PGC_POSTMASTER, LOGGING_WHERE,
			gettext_noop("Sets the format for log files."),
			gettext_noop("Valid values are TEXT, CSV.")
		},
		&gp_log_format_string,
		"csv", assign_gp_log_format, NULL
	},

5375 5376 5377 5378 5379 5380 5381
	{
		{"codegen_optimization_level", PGC_USERSET, DEVELOPER_OPTIONS,
			gettext_noop("Sets optimizer level to use when compiling generated code."),
			gettext_noop("Valid values are none, less, default, aggressive."),
			GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE | GUC_GPDB_ADDOPT
		},
		&codegen_optimization_level_str,
5382 5383 5384 5385 5386 5387
#ifdef USE_CODEGEN
		"default",
#else
		"",
#endif
		assign_codegen_optimization_level, NULL
5388 5389
	},

5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400
	{
		/* Can't be set in postgresql.conf */
		{"gp_server_version", PGC_INTERNAL, PRESET_OPTIONS,
			gettext_noop("Shows the Greenplum server version."),
			NULL,
			GUC_REPORT | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE
		},
		&gp_server_version_string,
		GP_VERSION, NULL, NULL
	},

5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566
	/* End-of-list marker */
	{
		{NULL, 0, 0, NULL, NULL}, NULL, NULL, NULL, NULL
	}
};

static const char *
assign_gp_log_format(const char *value, bool doit, GucSource source)
{
	int			log_format = 0;

	if (pg_strcasecmp(value, "text") == 0)
		log_format = 0;
	else if (pg_strcasecmp(value, "csv") == 0)
		log_format = 1;
	else
		ereport(ERROR,
				(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
				 errmsg("unrecognized \"gp_log_format\" key word: \"%s\"",
						value)));
	if (doit)
		gp_log_format = log_format;

	return value;
}


static const char *
assign_debug_dtm_action_protocol(const char *newval,
								 bool doit, GucSource source)
{
	if (pg_strcasecmp(newval, "none") == 0)
	{
		if (doit)
			Debug_dtm_action_protocol = DTX_PROTOCOL_COMMAND_NONE;
	}
	else if (pg_strcasecmp(newval, "abort_no_prepared") == 0)
	{
		if (doit)
			Debug_dtm_action_protocol = DTX_PROTOCOL_COMMAND_ABORT_NO_PREPARED;
	}
	else if (pg_strcasecmp(newval, "prepare") == 0)
	{
		if (doit)
			Debug_dtm_action_protocol = DTX_PROTOCOL_COMMAND_PREPARE;
	}
	else if (pg_strcasecmp(newval, "abort_some_prepared") == 0)
	{
		if (doit)
			Debug_dtm_action_protocol = DTX_PROTOCOL_COMMAND_ABORT_SOME_PREPARED;
	}
	else if (pg_strcasecmp(newval, "commit_prepared") == 0)
	{
		if (doit)
			Debug_dtm_action_protocol = DTX_PROTOCOL_COMMAND_COMMIT_PREPARED;
	}
	else if (pg_strcasecmp(newval, "abort_prepared") == 0)
	{
		if (doit)
			Debug_dtm_action_protocol = DTX_PROTOCOL_COMMAND_ABORT_PREPARED;
	}
	else if (pg_strcasecmp(newval, "retry_commit_prepared") == 0)
	{
		if (doit)
			Debug_dtm_action_protocol = DTX_PROTOCOL_COMMAND_RETRY_COMMIT_PREPARED;
	}
	else if (pg_strcasecmp(newval, "retry_abort_prepared") == 0)
	{
		if (doit)
			Debug_dtm_action_protocol = DTX_PROTOCOL_COMMAND_RETRY_ABORT_PREPARED;
	}
	else if (pg_strcasecmp(newval, "recovery_commit_prepared") == 0)
	{
		if (doit)
			Debug_dtm_action_protocol = DTX_PROTOCOL_COMMAND_RECOVERY_COMMIT_PREPARED;
	}
	else if (pg_strcasecmp(newval, "recovery_abort_prepared") == 0)
	{
		if (doit)
			Debug_dtm_action_protocol = DTX_PROTOCOL_COMMAND_RECOVERY_ABORT_PREPARED;
	}
	else if (pg_strcasecmp(newval, "subtransaction_begin") == 0)
	{
		if (doit)
			Debug_dtm_action_protocol = DTX_PROTOCOL_COMMAND_SUBTRANSACTION_BEGIN_INTERNAL;
	}
	else if (pg_strcasecmp(newval, "subtransaction_release") == 0)
	{
		if (doit)
			Debug_dtm_action_protocol = DTX_PROTOCOL_COMMAND_SUBTRANSACTION_RELEASE_INTERNAL;
	}
	else if (pg_strcasecmp(newval, "subtransaction_rollback") == 0)
	{
		if (doit)
			Debug_dtm_action_protocol = DTX_PROTOCOL_COMMAND_SUBTRANSACTION_ROLLBACK_INTERNAL;
	}
	else
		return NULL;			/* fail */
	return newval;				/* OK */
}

static const char *
assign_debug_persistent_print_level(const char *newval,
									bool doit, GucSource source)
{
	return (assign_msglvl(&Debug_persistent_print_level, newval, doit, source));
}

static const char *
assign_debug_persistent_recovery_print_level(const char *newval,
											 bool doit, GucSource source)
{
	return (assign_msglvl(&Debug_persistent_recovery_print_level, newval, doit, source));
}

static const char *
assign_debug_persistent_store_print_level(const char *newval,
										  bool doit, GucSource source)
{
	return (assign_msglvl(&Debug_persistent_store_print_level, newval, doit, source));
}

static const char *
assign_debug_database_command_print_level(const char *newval,
										  bool doit, GucSource source)
{
	return (assign_msglvl(&Debug_database_command_print_level, newval, doit, source));
}

static const char *
assign_gp_workfile_caching_loglevel(const char *newval,
									bool doit, GucSource source)
{
	return (assign_msglvl(&gp_workfile_caching_loglevel, newval, doit, source));
}

static const char *
assign_gp_sessionstate_loglevel(const char *newval,
								bool doit, GucSource source)
{
	return (assign_msglvl(&gp_sessionstate_loglevel, newval, doit, source));
}

static const char *
assign_optimizer_log_failure(const char *val, bool assign, GucSource source)
{
	if (pg_strcasecmp(val, "all") == 0 && assign)
	{
		optimizer_log_failure = OPTIMIZER_ALL_FAIL;
	}
	else if (pg_strcasecmp(val, "unexpected") == 0 && assign)
	{
		optimizer_log_failure = OPTIMIZER_UNEXPECTED_FAIL;
	}
	else if (pg_strcasecmp(val, "expected") == 0 && assign)
	{
		optimizer_log_failure = OPTIMIZER_EXPECTED_FAIL;
	}
	else
	{
		return NULL;			/* fail */
	}

	return val;
}

5567 5568 5569
static const char*
assign_codegen_optimization_level(const char *val, bool assign, GucSource source) {
#ifndef USE_CODEGEN
5570
	if (val && pg_strcasecmp(val, "") != 0)
5571 5572 5573
		ereport(ERROR,
			(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
				errmsg("Code generation is not supported by this build")));
5574
#else
5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595

	if (pg_strcasecmp(val, "none") == 0 && assign)
	{
		codegen_optimization_level = CODEGEN_OPTIMIZATION_LEVEL_NONE;
	}
	else if (pg_strcasecmp(val, "less") == 0 && assign)
	{
		codegen_optimization_level = CODEGEN_OPTIMIZATION_LEVEL_LESS;
	}
	else if (pg_strcasecmp(val, "default") == 0 && assign)
	{
		codegen_optimization_level = CODEGEN_OPTIMIZATION_LEVEL_DEFAULT;
	}
	else if (pg_strcasecmp(val, "aggressive") == 0 && assign)
	{
		codegen_optimization_level = CODEGEN_OPTIMIZATION_LEVEL_AGGRESSIVE;
	}
	else
	{
		return NULL;      /* fail */
	}
5596
#endif
5597 5598 5599 5600

	return val;
}

5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796

static const char *
assign_optimizer_minidump(const char *val, bool assign, GucSource source)
{
	if (pg_strcasecmp(val, "onerror") == 0 && assign)
	{
		optimizer_minidump = OPTIMIZER_MINIDUMP_FAIL;
	}
	else if (pg_strcasecmp(val, "always") == 0 && assign)
	{
		optimizer_minidump = OPTIMIZER_MINIDUMP_ALWAYS;
	}
	else
	{
		return NULL;			/* fail */
	}

	return val;
}

static const char *
assign_optimizer_cost_model(const char *val, bool assign, GucSource source)
{
	if (pg_strcasecmp(val, "legacy") == 0 && assign)
	{
		optimizer_cost_model = OPTIMIZER_GPDB_LEGACY;
	}
	else if (pg_strcasecmp(val, "calibrated") == 0 && assign)
	{
		optimizer_cost_model = OPTIMIZER_GPDB_CALIBRATED;
	}
	else
	{
		return NULL;			/* fail */
	}
	return val;
}

static const char *
assign_time_slice_report_level(const char *newval, bool doit, GucSource source)
{
	return (assign_msglvl(&gp_test_time_slice_report_level, newval, doit, source));
}

static const char *
assign_deadlock_hazard_report_level(const char *newval, bool doit, GucSource source)
{
	return (assign_msglvl(&gp_test_deadlock_hazard_report_level, newval, doit, source));
}

static const char *
assign_explain_memory_verbosity(const char *newval, bool doit, GucSource source)
{
	if (pg_strcasecmp(newval, "suppress") == 0)
	{
		if (doit)
			explain_memory_verbosity = EXPLAIN_MEMORY_VERBOSITY_SUPPRESS;
	}
	else if (pg_strcasecmp(newval, "summary") == 0)
	{
		if (doit)
			explain_memory_verbosity = EXPLAIN_MEMORY_VERBOSITY_SUMMARY;
	}
	else if (pg_strcasecmp(newval, "detail") == 0)
	{
		if (doit)
			explain_memory_verbosity = EXPLAIN_MEMORY_VERBOSITY_DETAIL;
	}
	else
	{
		printf("Unknown memory verbosity.");
		return NULL;
	}

	return newval;
}

static const char *
assign_system_cache_flush_force(const char *newval, bool doit, GucSource source)
{
	if (pg_strcasecmp(newval, "off") == 0)
	{
		if (doit)
			gp_test_system_cache_flush_force = SysCacheFlushForce_Off;
	}
	else if (pg_strcasecmp(newval, "recursive") == 0)
	{
		if (doit)
			gp_test_system_cache_flush_force = SysCacheFlushForce_Recursive;
	}
	else if (pg_strcasecmp(newval, "plain") == 0)
	{
		if (doit)
			gp_test_system_cache_flush_force = SysCacheFlushForce_NonRecursive;
	}
	else
	{
		return NULL;
	}

	return newval;
}

static const char *
assign_password_hash_algorithm(const char *newval, bool doit, GucSource source)
{
	if (pg_strcasecmp(newval, "MD5") == 0)
	{
		if (doit)
			password_hash_algorithm = PASSWORD_HASH_MD5;
	}
	else if (pg_strcasecmp(newval, "SHA-256") == 0)
	{
		if (doit)
			password_hash_algorithm = PASSWORD_HASH_SHA_256;
	}
	else
		return NULL;

	return newval;
}

static const char *
assign_gp_idf_deduplicate(const char *newval, bool doit, GucSource source)
{
	if (pg_strcasecmp(newval, "auto") == 0 ||
		pg_strcasecmp(newval, "none") == 0 ||
		pg_strcasecmp(newval, "force") == 0)
	{
		return newval;
	}
	return NULL;
}

static const char *
assign_gp_workfile_compress_algorithm(const char *newval, bool doit, GucSource source)
{
	int			i = bfz_string_to_compression(newval);

	if (i == -1)
		return NULL;			/* fail */
	if (doit)
		gp_workfile_compress_algorithm = i;
	return newval;				/* OK */
}

static const char *
assign_gp_workfile_type_hashjoin(const char *newval, bool doit, GucSource source)
{
	ExecWorkFileType newtype = BFZ;

	if (!pg_strcasecmp(newval, "bfz"))
	{
		newtype = BFZ;
	}
	else if (!pg_strcasecmp(newval, "buffile"))
	{
		newtype = BUFFILE;
	}
	else
		return NULL;
	if (doit)
		gp_workfile_type_hashjoin = newtype;

	return newval;
}

static bool
assign_optimizer(bool newval, bool doit, GucSource source)
{
#ifndef USE_ORCA
	if (newval)
		ereport(ERROR,
				(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
				 errmsg("ORCA is not supported by this build")));
#endif

	if (!optimizer_control)
	{
		if (source >= PGC_S_INTERACTIVE)
		{
			ereport(ERROR,
					(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
					 errmsg("cannot change the value of \"optimizer\"")));
		}

		/* source == PGC_S_OVERRIDE means do it anyway, eg at xact abort */
		if (source != PGC_S_OVERRIDE)
		{
			return false;
		}
	}

	return true;
}

5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809
static bool
assign_codegen(bool newval, bool doit, GucSource source)
{
#ifndef USE_CODEGEN
	if (newval)
		ereport(ERROR,
				(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
				 errmsg("Code generation is not supported by this build")));
#endif

	return true;
}

5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043
static bool
assign_dispatch_log_stats(bool newval, bool doit, GucSource source)
{
	if (newval &&
		(log_parser_stats || log_planner_stats || log_executor_stats || log_statement_stats))
	{
		if (source >= PGC_S_INTERACTIVE)
			ereport(ERROR,
					(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
					 errmsg("cannot enable \"log_dispatch_stats\" when "
							"\"log_statement_stats\", "
							"\"log_parser_stats\", \"log_planner_stats\", "
							"or \"log_executor_stats\" is true")));
		/* source == PGC_S_OVERRIDE means do it anyway, eg at xact abort */
		else if (source != PGC_S_OVERRIDE)
			return false;
	}
	return true;
}

#ifdef USE_CONNECTEMC
static const char *
assign_connectemc_mode(const char *newval, bool doit, GucSource source)
{
	if (pg_strcasecmp(newval, "on") == 0)
	{
		if (doit)
		{
			gp_emcconnect_transport = EMCCONNECT_MODE_TYPE_ON;
		}
	}
	else if (pg_strcasecmp(newval, "local") == 0)
	{
		if (doit)
		{
			gp_emcconnect_transport = EMCCONNECT_MODE_TYPE_LOCAL;
		}
	}
	else if (pg_strcasecmp(newval, "remote") == 0)
	{
		if (doit)
		{
			gp_emcconnect_transport = EMCCONNECT_MODE_TYPE_REMOTE;
		}
	}
	else if (pg_strcasecmp(newval, "off") == 0)
	{
		if (doit)
		{
			gp_emcconnect_transport = EMCCONNECT_MODE_TYPE_OFF;
		}
	}
	else
		return NULL;			/* fail */
	return newval;				/* OK */
}
#endif


static const char *
assign_debug_dtm_action(const char *newval,
						bool doit, GucSource source)
{
	if (pg_strcasecmp(newval, "none") == 0)
	{
		if (doit)
			Debug_dtm_action = DEBUG_DTM_ACTION_NONE;
	}
	else if (pg_strcasecmp(newval, "delay") == 0)
	{
		if (doit)
			Debug_dtm_action = DEBUG_DTM_ACTION_DELAY;
	}
	else if (pg_strcasecmp(newval, "fail_begin_command") == 0)
	{
		if (doit)
			Debug_dtm_action = DEBUG_DTM_ACTION_FAIL_BEGIN_COMMAND;
	}
	else if (pg_strcasecmp(newval, "fail_end_command") == 0)
	{
		if (doit)
			Debug_dtm_action = DEBUG_DTM_ACTION_FAIL_END_COMMAND;
	}
	else if (pg_strcasecmp(newval, "panic_begin_command") == 0)
	{
		if (doit)
			Debug_dtm_action = DEBUG_DTM_ACTION_PANIC_BEGIN_COMMAND;
	}
	else
		return NULL;			/* fail */
	return newval;				/* OK */
}

static const char *
assign_debug_dtm_action_target(const char *newval,
							   bool doit, GucSource source)
{
	if (pg_strcasecmp(newval, "none") == 0)
	{
		if (doit)
			Debug_dtm_action_target = DEBUG_DTM_ACTION_TARGET_NONE;
	}
	else if (pg_strcasecmp(newval, "protocol") == 0)
	{
		if (doit)
			Debug_dtm_action_target = DEBUG_DTM_ACTION_TARGET_PROTOCOL;
	}
	else if (pg_strcasecmp(newval, "sql") == 0)
	{
		if (doit)
			Debug_dtm_action_target = DEBUG_DTM_ACTION_TARGET_SQL;
	}
	else
		return NULL;			/* fail */
	return newval;				/* OK */
}

/*
 * Malloc a new string representing current storage_opts.
 */
static char *
storageOptToString(void)
{
	StringInfoData buf;
	char	   *ret;
	const StdRdOptions *ao_opts = currentAOStorageOptions();

	initStringInfo(&buf);
	appendStringInfo(&buf, "%s=%s", SOPT_APPENDONLY,
					 ao_opts->appendonly ? "true" : "false");
	appendStringInfo(&buf, ",%s=%d,", SOPT_BLOCKSIZE,
					 ao_opts->blocksize);
	if (ao_opts->compresstype)
	{
		appendStringInfo(&buf, "%s=%s,", SOPT_COMPTYPE,
						 ao_opts->compresstype);
	}
	else
	{
		appendStringInfo(&buf, "%s=none,", SOPT_COMPTYPE);
	}

	/*
	 * MPP-14504: we seem to allow compresslevel > 0 even when compression is
	 * disabled.
	 */
	if (ao_opts->compresslevel > 0)
	{
		appendStringInfo(&buf, "%s=%d,", SOPT_COMPLEVEL,
						 ao_opts->compresslevel);
	}
	appendStringInfo(&buf, "%s=%s,", SOPT_CHECKSUM,
					 ao_opts->checksum ? "true" : "false");
	appendStringInfo(&buf, "%s=%s", SOPT_ORIENTATION,
					 ao_opts->columnstore ? "column" : "row");
	ret = strdup(buf.data);
	if (ret == NULL)
		elog(ERROR, "out of memory");
	pfree(buf.data);
	return ret;
}

/*
 * Parse new value of storage options.  Update both, the GUC and
 * global ao_storage_opts object.
 */
static const char *
assign_gp_default_storage_options(const char *newval,
								  bool doit, GucSource source)
{
	if (source == PGC_S_DEFAULT || newval[0] == '\0')
	{
		/*
		 * Reset/init case, newval = "none".
		 */
		if (doit)
			resetDefaultAOStorageOpts();
	}
	else
	{
		PG_TRY();
		{
			/* Value of "appendonly" option if one is specified. */
			bool		aovalue = false;
			StdRdOptions *newopts = (StdRdOptions *)
			palloc0(sizeof(StdRdOptions));
			Datum		newopts_datum = parseAOStorageOpts(newval, &aovalue);

			/*
			 * Perform identical validations as in case of options specified
			 * in a WITH() clause.
			 */
			resetAOStorageOpts(newopts);
			parse_validate_reloptions(newopts, newopts_datum,
									   /* validate */ true, RELKIND_RELATION);
			validateAppendOnlyRelOptions(
										 newopts->appendonly,
										 newopts->blocksize,
										 gp_safefswritesize,
										 newopts->compresslevel,
										 newopts->compresstype,
										 newopts->checksum,
										 RELKIND_RELATION,
										 newopts->columnstore);

			/*
			 * All validations succeeded, it is safe to udpate global
			 * appendonly storage options.
			 */
			if (doit)
			{
				newopts->appendonly = aovalue;
				setDefaultAOStorageOpts(newopts);
			}
		}
		PG_CATCH();
		{
			if (source >= PGC_S_INTERACTIVE)
				PG_RE_THROW();
			else
			{
				/*
				 * We are in the middle of backend / postmaster startup.  The
				 * configured value is bad, proceed with factory defaults.
				 */
				elog(WARNING, "Unable to set gp_default_storage_options to '%s'",
					 newval);
				resetDefaultAOStorageOpts();
			}
		}
		PG_END_TRY();
	}
	return doit ? storageOptToString() : newval;
}