diff --git a/src/debug_guc.c b/src/debug_guc.c index e8657e27c..270dea5f6 100644 --- a/src/debug_guc.c +++ b/src/debug_guc.c @@ -12,6 +12,7 @@ #include "debug_guc.h" #include "debug_assert.h" +#include "extension_constants.h" TSDLLEXPORT DebugOptimizerFlags ts_debug_optimizer_flags; @@ -212,7 +213,7 @@ void ts_debug_init(void) { static char *debug_optimizer_flags_string = NULL; - DefineCustomStringVariable("timescaledb.debug_optimizer_flags", + DefineCustomStringVariable(MAKE_EXTOPTION("debug_optimizer_flags"), "List of optimizer debug flags", "A list of flags for configuring the optimizer debug output.", &debug_optimizer_flags_string, diff --git a/src/extension.c b/src/extension.c index 9d7db309a..3b431bbdf 100644 --- a/src/extension.c +++ b/src/extension.c @@ -31,7 +31,7 @@ #include "extension_utils.c" #include "compat/compat.h" -#define TS_UPDATE_SCRIPT_CONFIG_VAR "timescaledb.update_script_stage" +#define TS_UPDATE_SCRIPT_CONFIG_VAR MAKE_EXTOPTION("update_script_stage") #define POST_UPDATE "post" /* * The name of the experimental schema. diff --git a/src/extension_constants.h b/src/extension_constants.h index adbdc96f2..1b4759bb3 100644 --- a/src/extension_constants.h +++ b/src/extension_constants.h @@ -8,13 +8,16 @@ /* No function definitions here, only potentially globally available defines as this is used by the * loader*/ -#define EXTENSION_NAME "timescaledb" +#define EXTENSION_NAME "timescaledb" /* Name of the actual extension */ +#define EXTENSION_NAMESPACE "timescaledb" /* Namespace for extension objects */ #define EXTENSION_FDW_NAME "timescaledb_fdw" #define TSL_LIBRARY_NAME "timescaledb-tsl" #define TS_LIBDIR "$libdir/" #define EXTENSION_SO TS_LIBDIR "" EXTENSION_NAME #define EXTENSION_TSL_SO TS_LIBDIR TSL_LIBRARY_NAME "-" TIMESCALEDB_VERSION_MOD +#define MAKE_EXTOPTION(NAME) (EXTENSION_NAMESPACE "." NAME) + #define MAX_VERSION_LEN (NAMEDATALEN + 1) #define MAX_SO_NAME_LEN \ (8 + NAMEDATALEN + 1 + MAX_VERSION_LEN) /* "$libdir/"+extname+"-"+version \ @@ -44,4 +47,4 @@ typedef enum TsExtensionSchemas extern const char *const ts_extension_schema_names[]; -#define RENDEZVOUS_BGW_LOADER_API_VERSION "timescaledb.bgw_loader_api_version" +#define RENDEZVOUS_BGW_LOADER_API_VERSION MAKE_EXTOPTION("bgw_loader_api_version") diff --git a/src/extension_utils.c b/src/extension_utils.c index 9cbb529d4..e919e4949 100644 --- a/src/extension_utils.c +++ b/src/extension_utils.c @@ -32,7 +32,7 @@ #define EXTENSION_PROXY_TABLE "cache_inval_extension" -#define RENDEZVOUS_LOADER_PRESENT_NAME "timescaledb.loader_present" +#define RENDEZVOUS_LOADER_PRESENT_NAME MAKE_EXTOPTION("loader_present") enum ExtensionState { @@ -179,7 +179,7 @@ extension_load_without_preload() { /* cannot use GUC variable here since extension not yet loaded */ char *allow_install_without_preload = - GetConfigOptionByName("timescaledb.allow_install_without_preload", NULL, true); + GetConfigOptionByName(MAKE_EXTOPTION("allow_install_without_preload"), NULL, true); if (allow_install_without_preload == NULL || strcmp(allow_install_without_preload, "on") != 0) { diff --git a/src/guc.c b/src/guc.c index 17af01276..02ecde7e2 100644 --- a/src/guc.c +++ b/src/guc.c @@ -120,19 +120,19 @@ typedef struct } FeatureFlag; static FeatureFlag ts_feature_flags[] = { - [FEATURE_HYPERTABLE] = { "timescaledb.enable_hypertable_create", + [FEATURE_HYPERTABLE] = { MAKE_EXTOPTION("enable_hypertable_create"), "Enable creation of hypertable", &ts_guc_enable_hypertable_create }, - [FEATURE_HYPERTABLE_COMPRESSION] = { "timescaledb.enable_hypertable_compression", + [FEATURE_HYPERTABLE_COMPRESSION] = { MAKE_EXTOPTION("enable_hypertable_compression"), "Enable hypertable compression functions", &ts_guc_enable_hypertable_compression }, - [FEATURE_CAGG] = { "timescaledb.enable_cagg_create", + [FEATURE_CAGG] = { MAKE_EXTOPTION("enable_cagg_create"), "Enable creation of continuous aggregate", &ts_guc_enable_cagg_create }, - [FEATURE_POLICY] = { "timescaledb.enable_policy_create", + [FEATURE_POLICY] = { MAKE_EXTOPTION("enable_policy_create"), "Enable creation of policies and user-defined actions", &ts_guc_enable_policy_create } }; @@ -218,7 +218,7 @@ assign_max_open_chunks_per_insert_hook(int newval, void *extra) void _guc_init(void) { - DefineCustomBoolVariable("timescaledb.enable_deprecation_warnings", + DefineCustomBoolVariable(MAKE_EXTOPTION("enable_deprecation_warnings"), "Enable warnings when using deprecated functionality", NULL, &ts_guc_enable_deprecation_warnings, @@ -229,7 +229,7 @@ _guc_init(void) NULL, NULL); - DefineCustomBoolVariable("timescaledb.enable_optimizations", + DefineCustomBoolVariable(MAKE_EXTOPTION("enable_optimizations"), "Enable TimescaleDB query optimizations", NULL, &ts_guc_enable_optimizations, @@ -240,7 +240,7 @@ _guc_init(void) NULL, NULL); - DefineCustomBoolVariable("timescaledb.restoring", + DefineCustomBoolVariable(MAKE_EXTOPTION("restoring"), "Install timescale in restoring mode", "Used for running pg_restore", &ts_guc_restoring, @@ -251,7 +251,7 @@ _guc_init(void) NULL, NULL); - DefineCustomBoolVariable("timescaledb.enable_constraint_aware_append", + DefineCustomBoolVariable(MAKE_EXTOPTION("enable_constraint_aware_append"), "Enable constraint-aware append scans", "Enable constraint exclusion at execution time", &ts_guc_enable_constraint_aware_append, @@ -262,7 +262,7 @@ _guc_init(void) NULL, NULL); - DefineCustomBoolVariable("timescaledb.enable_ordered_append", + DefineCustomBoolVariable(MAKE_EXTOPTION("enable_ordered_append"), "Enable ordered append scans", "Enable ordered append optimization for queries that are ordered by " "the time dimension", @@ -274,7 +274,7 @@ _guc_init(void) NULL, NULL); - DefineCustomBoolVariable("timescaledb.enable_chunk_append", + DefineCustomBoolVariable(MAKE_EXTOPTION("enable_chunk_append"), "Enable chunk append node", "Enable using chunk append node", &ts_guc_enable_chunk_append, @@ -285,7 +285,7 @@ _guc_init(void) NULL, NULL); - DefineCustomBoolVariable("timescaledb.enable_parallel_chunk_append", + DefineCustomBoolVariable(MAKE_EXTOPTION("enable_parallel_chunk_append"), "Enable parallel chunk append node", "Enable using parallel aware chunk append node", &ts_guc_enable_parallel_chunk_append, @@ -296,7 +296,7 @@ _guc_init(void) NULL, NULL); - DefineCustomBoolVariable("timescaledb.enable_runtime_exclusion", + DefineCustomBoolVariable(MAKE_EXTOPTION("enable_runtime_exclusion"), "Enable runtime chunk exclusion", "Enable runtime chunk exclusion in ChunkAppend node", &ts_guc_enable_runtime_exclusion, @@ -307,7 +307,7 @@ _guc_init(void) NULL, NULL); - DefineCustomBoolVariable("timescaledb.enable_constraint_exclusion", + DefineCustomBoolVariable(MAKE_EXTOPTION("enable_constraint_exclusion"), "Enable constraint exclusion", "Enable planner constraint exclusion", &ts_guc_enable_constraint_exclusion, @@ -318,7 +318,7 @@ _guc_init(void) NULL, NULL); - DefineCustomBoolVariable("timescaledb.enable_qual_propagation", + DefineCustomBoolVariable(MAKE_EXTOPTION("enable_qual_propagation"), "Enable qualifier propagation", "Enable propagation of qualifiers in JOINs", &ts_guc_enable_qual_propagation, @@ -329,7 +329,7 @@ _guc_init(void) NULL, NULL); - DefineCustomBoolVariable("timescaledb.enable_dml_decompression", + DefineCustomBoolVariable(MAKE_EXTOPTION("enable_dml_decompression"), "Enable DML decompression", "Enable DML decompression when modifying compressed hypertable", &ts_guc_enable_dml_decompression, @@ -340,7 +340,7 @@ _guc_init(void) NULL, NULL); - DefineCustomIntVariable("timescaledb.max_tuples_decompressed_per_dml_transaction", + DefineCustomIntVariable(MAKE_EXTOPTION("max_tuples_decompressed_per_dml_transaction"), "The max number of tuples that can be decompressed during an " "INSERT, UPDATE, or DELETE.", " If the number of tuples exceeds this value, an error will " @@ -357,7 +357,7 @@ _guc_init(void) NULL, NULL); - DefineCustomBoolVariable("timescaledb.enable_transparent_decompression", + DefineCustomBoolVariable(MAKE_EXTOPTION("enable_transparent_decompression"), "Enable transparent decompression", "Enable transparent decompression when querying hypertable", &ts_guc_enable_transparent_decompression, @@ -368,7 +368,7 @@ _guc_init(void) NULL, NULL); - DefineCustomBoolVariable("timescaledb.enable_skipscan", + DefineCustomBoolVariable(MAKE_EXTOPTION("enable_skipscan"), "Enable SkipScan", "Enable SkipScan for DISTINCT queries", &ts_guc_enable_skip_scan, @@ -379,7 +379,7 @@ _guc_init(void) NULL, NULL); - DefineCustomBoolVariable("timescaledb.enable_decompression_logrep_markers", + DefineCustomBoolVariable(MAKE_EXTOPTION("enable_decompression_logrep_markers"), "Enable logical replication markers for decompression ops", "Enable the generation of logical replication markers in the " "WAL stream to mark the start and end of decompressions (for insert, " @@ -392,7 +392,7 @@ _guc_init(void) NULL, NULL); - DefineCustomBoolVariable("timescaledb.enable_decompression_sorted_merge", + DefineCustomBoolVariable(MAKE_EXTOPTION("enable_decompression_sorted_merge"), "Enable compressed batches heap merge", "Enable the merge of compressed batches to preserve the compression " "order by", @@ -404,7 +404,7 @@ _guc_init(void) NULL, NULL); - DefineCustomBoolVariable("timescaledb.enable_cagg_reorder_groupby", + DefineCustomBoolVariable(MAKE_EXTOPTION("enable_cagg_reorder_groupby"), "Enable group by reordering", "Enable group by clause reordering for continuous aggregates", &ts_guc_enable_cagg_reorder_groupby, @@ -415,7 +415,7 @@ _guc_init(void) NULL, NULL); - DefineCustomBoolVariable("timescaledb.enable_now_constify", + DefineCustomBoolVariable(MAKE_EXTOPTION("enable_now_constify"), "Enable now() constify", "Enable constifying now() in query constraints", &ts_guc_enable_now_constify, @@ -426,7 +426,7 @@ _guc_init(void) NULL, NULL); - DefineCustomBoolVariable("timescaledb.enable_cagg_watermark_constify", + DefineCustomBoolVariable(MAKE_EXTOPTION("enable_cagg_watermark_constify"), "Enable cagg watermark constify", "Enable constifying cagg watermark for real-time caggs", &ts_guc_enable_cagg_watermark_constify, @@ -437,7 +437,7 @@ _guc_init(void) NULL, NULL); - DefineCustomBoolVariable("timescaledb.enable_tiered_reads", + DefineCustomBoolVariable(MAKE_EXTOPTION("enable_tiered_reads"), "Enable tiered data reads", "Enable reading of tiered data by including a foreign table " "representing the data in the object storage into the query plan", @@ -449,7 +449,7 @@ _guc_init(void) NULL, NULL); - DefineCustomBoolVariable("timescaledb.enable_async_append", + DefineCustomBoolVariable(MAKE_EXTOPTION("enable_async_append"), "Enable async query execution on data nodes", "Enable optimization that runs remote queries asynchronously" "across data nodes", @@ -461,7 +461,7 @@ _guc_init(void) NULL, NULL); - DefineCustomBoolVariable("timescaledb.enable_chunkwise_aggregation", + DefineCustomBoolVariable(MAKE_EXTOPTION("enable_chunkwise_aggregation"), "Enable chunk-wise aggregation", "Enable the pushdown of aggregations to the" " chunk level", @@ -473,7 +473,7 @@ _guc_init(void) NULL, NULL); - DefineCustomBoolVariable("timescaledb.enable_vectorized_aggregation", + DefineCustomBoolVariable(MAKE_EXTOPTION("enable_vectorized_aggregation"), "Enable vectorized aggregation", "Enable vectorized aggregation for compressed data", &ts_guc_enable_vectorized_aggregation, @@ -484,7 +484,7 @@ _guc_init(void) NULL, NULL); - DefineCustomBoolVariable("timescaledb.enable_compression_indexscan", + DefineCustomBoolVariable(MAKE_EXTOPTION("enable_compression_indexscan"), "Enable compression to take indexscan path", "Enable indexscan during compression, if matching index is found", &ts_guc_enable_compression_indexscan, @@ -495,7 +495,7 @@ _guc_init(void) NULL, NULL); - DefineCustomBoolVariable("timescaledb.enable_bulk_decompression", + DefineCustomBoolVariable(MAKE_EXTOPTION("enable_bulk_decompression"), "Enable decompression of the entire compressed batches", "Increases throughput of decompression, but might increase query " "memory usage", @@ -507,7 +507,7 @@ _guc_init(void) NULL, NULL); - DefineCustomIntVariable("timescaledb.max_open_chunks_per_insert", + DefineCustomIntVariable(MAKE_EXTOPTION("max_open_chunks_per_insert"), "Maximum open chunks per insert", "Maximum number of open chunk tables per insert", &ts_guc_max_open_chunks_per_insert, @@ -520,7 +520,7 @@ _guc_init(void) assign_max_open_chunks_per_insert_hook, NULL); - DefineCustomIntVariable("timescaledb.max_cached_chunks_per_hypertable", + DefineCustomIntVariable(MAKE_EXTOPTION("max_cached_chunks_per_hypertable"), "Maximum cached chunks", "Maximum number of chunks stored in the cache", &ts_guc_max_cached_chunks_per_hypertable, @@ -533,7 +533,7 @@ _guc_init(void) assign_max_cached_chunks_per_hypertable_hook, NULL); #ifdef USE_TELEMETRY - DefineCustomEnumVariable("timescaledb.telemetry_level", + DefineCustomEnumVariable(MAKE_EXTOPTION("telemetry_level"), "Telemetry settings level", "Level used to determine which telemetry to send", (int *) &ts_guc_telemetry_level, @@ -546,7 +546,7 @@ _guc_init(void) NULL); #endif - DefineCustomStringVariable(/* name= */ "timescaledb.license", + DefineCustomStringVariable(/* name= */ MAKE_EXTOPTION("license"), /* short_desc= */ "TimescaleDB license type", /* long_desc= */ "Determines which features are enabled", /* valueAddr= */ &ts_guc_license, @@ -557,7 +557,7 @@ _guc_init(void) /* assign_hook= */ ts_license_guc_assign_hook, /* show_hook= */ NULL); - DefineCustomStringVariable(/* name= */ "timescaledb.last_tuned", + DefineCustomStringVariable(/* name= */ MAKE_EXTOPTION("last_tuned"), /* short_desc= */ "last tune run", /* long_desc= */ "records last time timescaledb-tune ran", /* valueAddr= */ &ts_last_tune_time, @@ -568,7 +568,7 @@ _guc_init(void) /* assign_hook= */ NULL, /* show_hook= */ NULL); - DefineCustomStringVariable(/* name= */ "timescaledb.last_tuned_version", + DefineCustomStringVariable(/* name= */ MAKE_EXTOPTION("last_tuned_version"), /* short_desc= */ "version of timescaledb-tune", /* long_desc= */ "version of timescaledb-tune used to tune", /* valueAddr= */ &ts_last_tune_version, @@ -579,7 +579,7 @@ _guc_init(void) /* assign_hook= */ NULL, /* show_hook= */ NULL); - DefineCustomEnumVariable("timescaledb.bgw_log_level", + DefineCustomEnumVariable(MAKE_EXTOPTION("bgw_log_level"), "Log level for the background worker subsystem", "Log level for the scheduler and workers of the background worker " "subsystem. Requires configuration reload to change.", @@ -593,7 +593,7 @@ _guc_init(void) NULL); /* this information is useful in general on customer deployments */ - DefineCustomBoolVariable(/* name= */ "timescaledb.debug_compression_path_info", + DefineCustomBoolVariable(/* name= */ MAKE_EXTOPTION("debug_compression_path_info"), /* short_desc= */ "show various compression-related debug info", /* long_desc= */ "this is for debugging/information purposes", /* valueAddr= */ &ts_guc_debug_compression_path_info, @@ -618,7 +618,7 @@ _guc_init(void) #endif #ifdef TS_DEBUG - DefineCustomBoolVariable(/* name= */ "timescaledb.shutdown_bgw_scheduler", + DefineCustomBoolVariable(/* name= */ MAKE_EXTOPTION("shutdown_bgw_scheduler"), /* short_desc= */ "immediately shutdown the bgw scheduler", /* long_desc= */ "this is for debugging purposes", /* valueAddr= */ &ts_shutdown_bgw, @@ -629,7 +629,7 @@ _guc_init(void) /* assign_hook= */ NULL, /* show_hook= */ NULL); - DefineCustomStringVariable(/* name= */ "timescaledb.current_timestamp_mock", + DefineCustomStringVariable(/* name= */ MAKE_EXTOPTION("current_timestamp_mock"), /* short_desc= */ "set the current timestamp", /* long_desc= */ "this is for debugging purposes", /* valueAddr= */ &ts_current_timestamp_mock, @@ -640,7 +640,7 @@ _guc_init(void) /* assign_hook= */ NULL, /* show_hook= */ NULL); - DefineCustomEnumVariable(/* name= */ "timescaledb.debug_require_vector_qual", + DefineCustomEnumVariable(/* name= */ MAKE_EXTOPTION("debug_require_vector_qual"), /* short_desc= */ "ensure that non-vectorized or vectorized filters are used in " "DecompressChunk node", @@ -658,7 +658,7 @@ _guc_init(void) /* assign_hook= */ NULL, /* show_hook= */ NULL); - DefineCustomBoolVariable(/* name= */ "timescaledb.debug_require_batch_sorted_merge", + DefineCustomBoolVariable(/* name= */ MAKE_EXTOPTION("debug_require_batch_sorted_merge"), /* short_desc= */ "require batch sorted merge in DecompressChunk node", /* long_desc= */ "this is for debugging purposes", /* valueAddr= */ &ts_guc_debug_require_batch_sorted_merge, diff --git a/src/license_guc.c b/src/license_guc.c index 0c1c623f5..ebe9ea76a 100644 --- a/src/license_guc.c +++ b/src/license_guc.c @@ -93,7 +93,7 @@ ts_license_enable_module_loading(void) load_enabled = true; /* re-set the license to actually load the submodule if needed */ - result = set_config_option("timescaledb.license", + result = set_config_option(MAKE_EXTOPTION("license"), ts_guc_license, PGC_SUSET, load_source, diff --git a/src/loader/bgw_counter.c b/src/loader/bgw_counter.c index 3a3a845f4..3041c9d7d 100644 --- a/src/loader/bgw_counter.c +++ b/src/loader/bgw_counter.c @@ -16,6 +16,7 @@ #include #include "bgw_counter.h" +#include "extension_constants.h" #define BGW_COUNTER_STATE_NAME "ts_bgw_counter_state" @@ -60,7 +61,7 @@ bgw_counter_state_init() extern void ts_bgw_counter_setup_gucs(void) { - DefineCustomIntVariable("timescaledb.max_background_workers", + DefineCustomIntVariable(MAKE_EXTOPTION("max_background_workers"), "Maximum background worker processes allocated to TimescaleDB", "Max background worker processes allocated to TimescaleDB - set to at " "least 1 + number of databases in Postgres instance to use background " diff --git a/src/loader/loader.c b/src/loader/loader.c index e7a90b0e2..34b873cd2 100644 --- a/src/loader/loader.c +++ b/src/loader/loader.c @@ -83,7 +83,7 @@ PG_MODULE_MAGIC; #endif #define POST_LOAD_INIT_FN "ts_post_load_init" -#define GUC_LAUNCHER_POLL_TIME_MS "timescaledb.bgw_launcher_poll_time" +#define GUC_LAUNCHER_POLL_TIME_MS MAKE_EXTOPTION("bgw_launcher_poll_time") /* * The loader really shouldn't load if we're in a parallel worker as there is a @@ -146,10 +146,10 @@ TsExtension extensions[] = { /* Redundant default initializers are here because we compile with * `-Werror -Wmissing-field-initializers` for our PG13 build... */ { - .name = "timescaledb", + .name = EXTENSION_NAME, .schema_name = CACHE_SCHEMA_NAME, .table_name = EXTENSION_PROXY_TABLE, - .guc_disable_load_name = "timescaledb.disable_load", + .guc_disable_load_name = MAKE_EXTOPTION("disable_load"), .guc_disable_load = false, .soversion = "", .post_parse_analyze_hook = NULL, @@ -699,9 +699,9 @@ do_load(TsExtension *const ext) * loader was preloaded, newer versions use rendezvous variables instead. */ if ((strcmp(version, "0.9.0") == 0 || strcmp(version, "0.9.1") == 0) && - strcmp(ext->name, "timescaledb") == 0) + strcmp(ext->name, EXTENSION_NAME) == 0) { - SetConfigOption("timescaledb.loader_present", "on", PGC_USERSET, PGC_S_SESSION); + SetConfigOption(MAKE_EXTOPTION("loader_present"), "on", PGC_USERSET, PGC_S_SESSION); } /* diff --git a/src/telemetry/telemetry.c b/src/telemetry/telemetry.c index e5e59806e..0f7c144c8 100644 --- a/src/telemetry/telemetry.c +++ b/src/telemetry/telemetry.c @@ -715,7 +715,7 @@ add_function_call_telemetry(JsonbParseState *state) return; } - visible_extensions[0] = "timescaledb"; + visible_extensions[0] = EXTENSION_NAME; for (size_t i = 1; i < sizeof(visible_extensions) / sizeof(char *); i++) visible_extensions[i] = related_extensions[i - 1]; diff --git a/src/ts_catalog/continuous_agg.c b/src/ts_catalog/continuous_agg.c index f1367456e..73cca4edc 100644 --- a/src/ts_catalog/continuous_agg.c +++ b/src/ts_catalog/continuous_agg.c @@ -125,7 +125,7 @@ ts_continuous_agg_get_compression_defelems(const WithClauseResult *with_clauses) if (!input->is_default) { Node *value = (Node *) makeString(ts_with_clause_result_deparse_value(input)); - DefElem *elem = makeDefElemExtended("timescaledb", + DefElem *elem = makeDefElemExtended(EXTENSION_NAMESPACE, (char *) def.arg_name, value, DEFELEM_UNSPEC, diff --git a/src/with_clause_parser.c b/src/with_clause_parser.c index 3654fb679..7a1a47899 100644 --- a/src/with_clause_parser.c +++ b/src/with_clause_parser.c @@ -15,10 +15,9 @@ #include #include "debug_assert.h" +#include "extension_constants.h" #include "with_clause_parser.h" -#define TIMESCALEDB_NAMESPACE "timescaledb" - /* * Filter a list of DefElem based on a namespace. * This function will iterate through DefElem and output up to two lists: @@ -41,8 +40,7 @@ ts_with_clause_filter(const List *def_elems, List **within_namespace, List **not { DefElem *def = (DefElem *) lfirst(cell); - if (def->defnamespace != NULL && - pg_strcasecmp(def->defnamespace, TIMESCALEDB_NAMESPACE) == 0) + if (def->defnamespace != NULL && pg_strcasecmp(def->defnamespace, EXTENSION_NAMESPACE) == 0) { if (within_namespace != NULL) *within_namespace = lappend(*within_namespace, def); diff --git a/test/src/test_utils.c b/test/src/test_utils.c index 36cee439c..657d4d790 100644 --- a/test/src/test_utils.c +++ b/test/src/test_utils.c @@ -20,6 +20,7 @@ #include #include "debug_point.h" +#include "extension_constants.h" TS_FUNCTION_INFO_V1(ts_test_error_injection); TS_FUNCTION_INFO_V1(ts_debug_shippable_error_after_n_rows); @@ -139,7 +140,7 @@ get_error_after_rows() int error_after = 7103; /* default is an arbitrary prime */ const char *error_after_option = - GetConfigOption("timescaledb.debug_broken_sendrecv_error_after", true, false); + GetConfigOption(MAKE_EXTOPTION("debug_broken_sendrecv_error_after"), true, false); if (error_after_option) { error_after = pg_strtoint32(error_after_option); diff --git a/tsl/src/continuous_aggs/options.c b/tsl/src/continuous_aggs/options.c index bf6070463..9d78cf12a 100644 --- a/tsl/src/continuous_aggs/options.c +++ b/tsl/src/continuous_aggs/options.c @@ -172,7 +172,7 @@ cagg_get_compression_params(ContinuousAgg *agg, Hypertable *mat_ht) List *defelems = NIL; const Dimension *mat_ht_dim = hyperspace_get_open_dimension(mat_ht->space, 0); const char *mat_ht_timecolname = quote_identifier(NameStr(mat_ht_dim->fd.column_name)); - DefElem *ordby = makeDefElemExtended("timescaledb", + DefElem *ordby = makeDefElemExtended(EXTENSION_NAMESPACE, "compress_orderby", (Node *) makeString((char *) mat_ht_timecolname), DEFELEM_UNSPEC, @@ -197,7 +197,7 @@ cagg_get_compression_params(ContinuousAgg *agg, Hypertable *mat_ht) if (info->len > 0) { DefElem *segby; - segby = makeDefElemExtended("timescaledb", + segby = makeDefElemExtended(EXTENSION_NAMESPACE, "compress_segmentby", (Node *) makeString(info->data), DEFELEM_UNSPEC, diff --git a/tsl/src/continuous_aggs/refresh.c b/tsl/src/continuous_aggs/refresh.c index 0a2818bd9..3f85fe820 100644 --- a/tsl/src/continuous_aggs/refresh.c +++ b/tsl/src/continuous_aggs/refresh.c @@ -350,7 +350,7 @@ materialization_per_refresh_window(void) { #define DEFAULT_MATERIALIZATIONS_PER_REFRESH_WINDOW 10 #define MATERIALIZATIONS_PER_REFRESH_WINDOW_OPT_NAME \ - "timescaledb.materializations_per_refresh_window" + MAKE_EXTOPTION("materializations_per_refresh_window") const char *max_materializations_setting = GetConfigOption(MATERIALIZATIONS_PER_REFRESH_WINDOW_OPT_NAME, true, false);