From a4773adb58fd91cf83d0a0220fc56c2d0523a288 Mon Sep 17 00:00:00 2001 From: Matvey Arye Date: Fri, 6 Sep 2019 14:20:02 -0400 Subject: [PATCH] Make compression feature use the community license Compression is a community, not enterprise feature. --- src/cross_module_fn.c | 20 ++++++++++---------- tsl/src/bgw_policy/job.c | 2 +- tsl/test/expected/compression_bgw.out | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/cross_module_fn.c b/src/cross_module_fn.c index 2427f9d51..01f148bda 100644 --- a/src/cross_module_fn.c +++ b/src/cross_module_fn.c @@ -300,7 +300,7 @@ static bool process_compress_table_default(AlterTableCmd *cmd, Hypertable *ht, WithClauseResult *with_clause_options) { - error_no_default_fn_enterprise(); + error_no_default_fn_community(); pg_unreachable(); } @@ -353,35 +353,35 @@ continuous_agg_drop_chunks_by_chunk_id_default(int32 raw_hypertable_id, Chunk ** static bytea * segment_meta_min_max_send_default(Datum arg1) { - error_no_default_fn_enterprise(); + error_no_default_fn_community(); pg_unreachable(); } static Datum segment_meta_min_max_recv_default(StringInfo buf) { - error_no_default_fn_enterprise(); + error_no_default_fn_community(); pg_unreachable(); } static Datum segment_meta_get_min_default(Datum meta, Oid type) { - error_no_default_fn_enterprise(); + error_no_default_fn_community(); pg_unreachable(); } static Datum segment_meta_get_max_default(Datum meta, Oid type) { - error_no_default_fn_enterprise(); + error_no_default_fn_community(); pg_unreachable(); } static bool segment_meta_has_null_default(Datum meta) { - error_no_default_fn_enterprise(); + error_no_default_fn_community(); pg_unreachable(); } @@ -402,10 +402,10 @@ TSDLLEXPORT CrossModuleFunctions ts_cm_functions_default = { .continuous_agg_materialize = cagg_materialize_default_fn, .add_drop_chunks_policy = error_no_default_fn_pg_enterprise, .add_reorder_policy = error_no_default_fn_pg_enterprise, - .add_compress_chunks_policy = error_no_default_fn_pg_enterprise, + .add_compress_chunks_policy = error_no_default_fn_pg_community, .remove_drop_chunks_policy = error_no_default_fn_pg_enterprise, .remove_reorder_policy = error_no_default_fn_pg_enterprise, - .remove_compress_chunks_policy = error_no_default_fn_pg_enterprise, + .remove_compress_chunks_policy = error_no_default_fn_pg_community, .create_upper_paths_hook = NULL, .set_rel_pathlist_hook = NULL, .gapfill_marker = error_no_default_fn_pg_community, @@ -434,8 +434,8 @@ TSDLLEXPORT CrossModuleFunctions ts_cm_functions_default = { .compressed_data_in = error_no_default_fn_pg_community, .compressed_data_out = error_no_default_fn_pg_community, .process_compress_table = process_compress_table_default, - .compress_chunk = error_no_default_fn_pg_enterprise, - .decompress_chunk = error_no_default_fn_pg_enterprise, + .compress_chunk = error_no_default_fn_pg_community, + .decompress_chunk = error_no_default_fn_pg_community, .segment_meta_min_max_send = segment_meta_min_max_send_default, .segment_meta_min_max_recv = segment_meta_min_max_recv_default, .segment_meta_get_min = segment_meta_get_min_default, diff --git a/tsl/src/bgw_policy/job.c b/tsl/src/bgw_policy/job.c index a3f924389..a7065c0f7 100644 --- a/tsl/src/bgw_policy/job.c +++ b/tsl/src/bgw_policy/job.c @@ -344,7 +344,7 @@ bgw_policy_job_requires_enterprise_license(BgwJob *job) case JOB_TYPE_CONTINUOUS_AGGREGATE: return false; case JOB_TYPE_COMPRESS_CHUNKS: - return true; + return false; default: elog(ERROR, "scheduler could not determine the license type for job type: \"%s\"", diff --git a/tsl/test/expected/compression_bgw.out b/tsl/test/expected/compression_bgw.out index 1befd5e85..feabcdd08 100644 --- a/tsl/test/expected/compression_bgw.out +++ b/tsl/test/expected/compression_bgw.out @@ -128,7 +128,7 @@ select job_id as compressjob_id, hypertable_id, older_than from _timescaledb_con -- try to execute the policy after it has been dropped -- \set ON_ERROR_STOP 0 select test_compress_chunks_policy(:compressjob_id); -ERROR: bgw job not found +ERROR: job 1000 not found \set ON_ERROR_STOP 1 --TEST 7 --compress chunks policy for integer based partition hypertable