From 09636092714bbff8689d8d37c3965b99bee0db26 Mon Sep 17 00:00:00 2001 From: Jacob Champion Date: Mon, 6 Feb 2023 09:05:33 -0800 Subject: [PATCH] Align GUC initializations with boot values As of upstream a73952b795 (16devel), custom GUCs have their initialized values checked against the configured boot value. If they differ, an assertion is tripped. So I've gone through the list and aligned the two sides, adding defaults where they did not previously exist for consistency. To allow for dynamic boot values, the new assertion logic allows the initialized value to be zero, in which case any boot value will be accepted. ts_guc_max_open_chunks_per_insert relies on the value of work_mem, so I've removed its (explicit) initializer entirely. --- src/guc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/guc.c b/src/guc.c index dc2c48cd5..e4a9eb80e 100644 --- a/src/guc.c +++ b/src/guc.c @@ -80,8 +80,8 @@ bool ts_guc_enable_parameterized_data_node_scan = true; bool ts_guc_enable_async_append = true; TSDLLEXPORT bool ts_guc_enable_compression_indexscan = true; TSDLLEXPORT bool ts_guc_enable_skip_scan = true; -int ts_guc_max_open_chunks_per_insert = 10; -int ts_guc_max_cached_chunks_per_hypertable = 10; +int ts_guc_max_open_chunks_per_insert; /* default is computed at runtime */ +int ts_guc_max_cached_chunks_per_hypertable = 100; #ifdef USE_TELEMETRY TelemetryLevel ts_guc_telemetry_level = TELEMETRY_DEFAULT; char *ts_telemetry_cloud = NULL; @@ -90,10 +90,10 @@ char *ts_telemetry_cloud = NULL; TSDLLEXPORT char *ts_guc_license = TS_LICENSE_DEFAULT; char *ts_last_tune_time = NULL; char *ts_last_tune_version = NULL; -TSDLLEXPORT bool ts_guc_enable_2pc; +TSDLLEXPORT bool ts_guc_enable_2pc = true; TSDLLEXPORT int ts_guc_max_insert_batch_size = 1000; -TSDLLEXPORT bool ts_guc_enable_connection_binary_data; -TSDLLEXPORT DistCopyTransferFormat ts_guc_dist_copy_transfer_format; +TSDLLEXPORT bool ts_guc_enable_connection_binary_data = true; +TSDLLEXPORT DistCopyTransferFormat ts_guc_dist_copy_transfer_format = DCTF_Auto; TSDLLEXPORT bool ts_guc_enable_client_ddl_on_data_nodes = false; TSDLLEXPORT char *ts_guc_ssl_dir = NULL; TSDLLEXPORT char *ts_guc_passfile = NULL; @@ -104,7 +104,7 @@ TSDLLEXPORT int ts_guc_hypertable_replication_factor_default = 1; #ifdef TS_DEBUG bool ts_shutdown_bgw = false; -char *ts_current_timestamp_mock = ""; +char *ts_current_timestamp_mock = NULL; #endif /*