Move enterprise features to community

As of this change, a number of enterprise features are accessible to
community users. These features include:

* reorder
* policies around reorder and drop chunks

The move chunks feature is still covered by enterprise. Gapfill no
longer warns about expired enterprise license.

Tests have been updated to reflect these changes.
This commit is contained in:
Erik Nordström 2020-02-03 15:59:32 +01:00 committed by Erik Nordström
parent 66f47c0857
commit 9da50cc686
27 changed files with 39 additions and 91 deletions

View File

@ -18,6 +18,11 @@ accidentally triggering the load of a previous DB version.**
* #1686 Fix order by queries on compressed hypertables that have char segment by column
* #1687 Fix issue with disabling compression when foreign keys are present
**Licensing changes**
* Reorder and policies around reorder and drop chunks are now
accessible to community users, not just enterprise
* Gapfill functionality no longer warns about expired license
**Thanks**
* @RJPhillips01 for reporting an issue with drop chunks.
* @b4eEx for reporting an issue with disabling compression.

View File

@ -367,11 +367,11 @@ TSDLLEXPORT CrossModuleFunctions ts_cm_functions_default = {
.add_tsl_license_info_telemetry = add_telemetry_default,
.bgw_policy_job_execute = bgw_policy_job_execute_default_fn,
.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_drop_chunks_policy = error_no_default_fn_pg_community,
.add_reorder_policy = error_no_default_fn_pg_community,
.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_drop_chunks_policy = error_no_default_fn_pg_community,
.remove_reorder_policy = error_no_default_fn_pg_community,
.remove_compress_chunks_policy = error_no_default_fn_pg_community,
.create_upper_paths_hook = NULL,
.set_rel_pathlist_dml = NULL,
@ -383,7 +383,7 @@ TSDLLEXPORT CrossModuleFunctions ts_cm_functions_default = {
.gapfill_date_time_bucket = error_no_default_fn_pg_community,
.gapfill_timestamp_time_bucket = error_no_default_fn_pg_community,
.gapfill_timestamptz_time_bucket = error_no_default_fn_pg_community,
.alter_job_schedule = error_no_default_fn_pg_enterprise,
.alter_job_schedule = error_no_default_fn_pg_community,
.reorder_chunk = error_no_default_fn_pg_community,
.move_chunk = error_no_default_fn_pg_enterprise,
.ddl_command_start = NULL,

View File

@ -57,8 +57,7 @@ drop_chunks_add_policy(PG_FUNCTION_ARGS)
Hypertable *hypertable;
Cache *hcache;
FormData_ts_interval *older_than;
license_enforce_enterprise_enabled();
license_print_expiration_warning_if_needed();
ts_hypertable_permissions_check(ht_oid, GetUserId());
/* Make sure that an existing policy doesn't exist on this hypertable */
@ -106,7 +105,7 @@ drop_chunks_add_policy(PG_FUNCTION_ARGS)
{
ts_cache_release(hcache);
elog(WARNING,
"could not add drop_chunks policy due to existing policy on hypertable with "
"could not add drop chunks policy due to existing policy on hypertable with "
"different arguments");
PG_RETURN_INT32(-1);
}
@ -148,8 +147,6 @@ drop_chunks_remove_policy(PG_FUNCTION_ARGS)
int ht_id = ts_hypertable_relid_to_id(hypertable_oid);
BgwPolicyDropChunks *policy = ts_bgw_policy_drop_chunks_find_by_hypertable(ht_id);
license_enforce_enterprise_enabled();
license_print_expiration_warning_if_needed();
ts_hypertable_permissions_check(hypertable_oid, GetUserId());
if (policy == NULL)

View File

@ -322,34 +322,37 @@ execute_compress_chunks_policy(BgwJob *job)
}
static bool
bgw_policy_job_requires_enterprise_license(BgwJob *job)
bgw_policy_job_check_enterprise_license(BgwJob *job)
{
license_print_expiration_warning_if_needed();
bool required = true;
switch (job->bgw_type)
{
case JOB_TYPE_REORDER:
return true;
case JOB_TYPE_DROP_CHUNKS:
return true;
case JOB_TYPE_CONTINUOUS_AGGREGATE:
return false;
case JOB_TYPE_COMPRESS_CHUNKS:
return false;
required = false;
break;
default:
elog(ERROR,
"scheduler could not determine the license type for job type: \"%s\"",
NameStr(job->fd.job_type));
}
pg_unreachable();
if (required)
{
license_enforce_enterprise_enabled();
license_print_expiration_warning_if_needed();
}
return required;
}
bool
tsl_bgw_policy_job_execute(BgwJob *job)
{
if (bgw_policy_job_requires_enterprise_license(job))
license_enforce_enterprise_enabled();
license_print_expiration_warning_if_needed();
bgw_policy_job_check_enterprise_license(job);
switch (job->bgw_type)
{
@ -401,10 +404,7 @@ bgw_policy_alter_job_schedule(PG_FUNCTION_ARGS)
errmsg("cannot alter policy schedule, policy #%d not found", job_id)));
}
if (bgw_policy_job_requires_enterprise_license(job))
license_enforce_enterprise_enabled();
license_print_expiration_warning_if_needed();
bgw_policy_job_check_enterprise_license(job);
ts_bgw_job_permission_check(job);
if (!PG_ARGISNULL(1))

View File

@ -88,8 +88,6 @@ reorder_add_policy(PG_FUNCTION_ARGS)
.hypertable_index_name = *index_name,
} };
license_enforce_enterprise_enabled();
license_print_expiration_warning_if_needed();
ts_hypertable_permissions_check(ht_oid, GetUserId());
/* First verify that the hypertable corresponds to a valid table */
@ -175,9 +173,6 @@ reorder_remove_policy(PG_FUNCTION_ARGS)
int ht_id = ts_hypertable_relid_to_id(hypertable_oid);
BgwPolicyReorder *policy = ts_bgw_policy_reorder_find_by_hypertable(ht_id);
license_enforce_enterprise_enabled();
license_print_expiration_warning_if_needed();
if (policy == NULL)
{
if (!if_exists)

View File

@ -14,7 +14,6 @@
Datum
gapfill_marker(PG_FUNCTION_ARGS)
{
license_print_expiration_warning_if_needed();
if (PG_ARGISNULL(0))
PG_RETURN_NULL();
else

View File

@ -410,8 +410,6 @@ plan_add_gapfill(PlannerInfo *root, RelOptInfo *group_rel)
if (context.count == 0)
return;
license_print_expiration_warning_if_needed();
#ifndef HAVE_INT64_TIMESTAMP
/*

View File

@ -96,8 +96,6 @@ tsl_reorder_chunk(PG_FUNCTION_ARGS)
/* used for debugging purposes only see finish_heap_swaps */
Oid wait_id = PG_NARGS() < 4 || PG_ARGISNULL(3) ? InvalidOid : PG_GETARG_OID(3);
license_print_expiration_warning_if_needed();
/*
* Allow reorder in transactions for testing purposes only
*/

View File

@ -62,7 +62,6 @@ SELECT COUNT(*) FROM _timescaledb_catalog.chunk as c, _timescaledb_catalog.hyper
-- Make sure reorder correctly selects chunks to reorder
-- by starting with oldest chunks
select add_reorder_policy('test_table', 'test_table_time_idx') as reorder_job_id \gset
WARNING: Timescale License expired
select * from _timescaledb_config.bgw_policy_reorder where job_id=:reorder_job_id;
job_id | hypertable_id | hypertable_index_name
--------+---------------+-----------------------
@ -488,7 +487,6 @@ SELECT count(*) FROM _timescaledb_catalog.chunk as c, _timescaledb_catalog.hyper
(1 row)
select add_drop_chunks_policy('test_table_int', 1, true) as drop_chunks_job_id \gset
WARNING: Timescale License expired
-- Now simulate drop_chunks running automatically by calling it explicitly
select test_drop_chunks(:drop_chunks_job_id);
test_drop_chunks
@ -735,7 +733,6 @@ alter schema new_public rename to public;
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER_2
\set ON_ERROR_STOP 0
select add_reorder_policy('test_table_perm', 'test_table_perm_pkey');
WARNING: Timescale License expired
ERROR: must be owner of hypertable "test_table_perm"
select remove_reorder_policy('test_table');
ERROR: must be owner of hypertable "test_table"

View File

@ -99,7 +99,6 @@ SELECT json_object_field(get_telemetry_report(always_display_report := true)::js
(1 row)
select add_reorder_policy('test_reorder_table', 'test_reorder_table_time_idx') as reorder_job_id \gset
WARNING: Timescale License expired
SELECT json_object_field(get_telemetry_report(always_display_report := true)::json,'num_reorder_policies');
json_object_field
-------------------
@ -426,7 +425,6 @@ SELECT json_object_field(get_telemetry_report(always_display_report := true)::js
(1 row)
SELECT add_drop_chunks_policy('test_drop_chunks_table', INTERVAL '4 months') as drop_chunks_job_id \gset
WARNING: Timescale License expired
SELECT json_object_field(get_telemetry_report(always_display_report := true)::json,'num_drop_chunks_policies');
json_object_field
-------------------

View File

@ -80,7 +80,6 @@ SELECT json_object_field(get_telemetry_report(always_display_report := true)::js
(1 row)
SELECT add_drop_chunks_policy('test_drop_chunks_table', INTERVAL '4 months') as drop_chunks_job_id \gset
WARNING: Timescale License expired
SELECT json_object_field(get_telemetry_report(always_display_report := true)::json,'num_drop_chunks_policies');
json_object_field
-------------------

View File

@ -64,7 +64,6 @@ select * from _timescaledb_config.bgw_job where job_type like 'compress%';
(1 row)
select * from alter_job_schedule(:compressjob_id, schedule_interval=>'1s');
WARNING: Timescale License expired
job_id | schedule_interval | max_runtime | max_retries | retry_period | next_start
--------+-------------------+-------------+-------------+--------------+------------
1000 | @ 1 sec | @ 0 | -1 | @ 1 hour | -infinity

View File

@ -260,7 +260,6 @@ FROM _timescaledb_catalog.hypertable comp_hyper
INNER JOIN _timescaledb_catalog.hypertable uncomp_hyper ON (comp_hyper.id = uncomp_hyper.compressed_hypertable_id)
WHERE uncomp_hyper.table_name like 'foo' ORDER BY comp_hyper.id LIMIT 1 \gset
select add_drop_chunks_policy(:'COMPRESSED_HYPER_NAME', INTERVAL '4 months', true);
WARNING: Timescale License expired
ERROR: cannot add drop chunks policy to hypertable "_compressed_hypertable_15" which contains compressed data
--Constraint checking for compression
create table fortable(col integer primary key);

View File

@ -113,7 +113,6 @@ REVOKE EXECUTE ON FUNCTION get_constant() FROM PUBLIC;
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER_2
\set ON_ERROR_STOP 0
select from alter_job_schedule(:cagg_job_id, max_runtime => NULL);
WARNING: Timescale License expired
ERROR: insufficient permssions to alter job 1000
--make sure that commands fail
ALTER VIEW mat_refresh_test SET(timescaledb.refresh_lag = '6 h', timescaledb.refresh_interval = '2h');

View File

@ -113,7 +113,6 @@ REVOKE EXECUTE ON FUNCTION get_constant() FROM PUBLIC;
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER_2
\set ON_ERROR_STOP 0
select from alter_job_schedule(:cagg_job_id, max_runtime => NULL);
WARNING: Timescale License expired
ERROR: insufficient permssions to alter job 1000
--make sure that commands fail
ALTER VIEW mat_refresh_test SET(timescaledb.refresh_lag = '6 h', timescaledb.refresh_interval = '2h');

View File

@ -113,7 +113,6 @@ REVOKE EXECUTE ON FUNCTION get_constant() FROM PUBLIC;
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER_2
\set ON_ERROR_STOP 0
select from alter_job_schedule(:cagg_job_id, max_runtime => NULL);
WARNING: Timescale License expired
ERROR: insufficient permssions to alter job 1000
--make sure that commands fail
ALTER VIEW mat_refresh_test SET(timescaledb.refresh_lag = '6 h', timescaledb.refresh_interval = '2h');

View File

@ -16,7 +16,6 @@ CREATE TABLE sensors(sensor_id INT, name TEXT);
INSERT INTO sensors VALUES (1,'Sensor 1'),(2,'Sensor 2'),(3,'Sensor 3');
-- test locf and interpolate call without gapfill
SELECT locf(1);
WARNING: Timescale License expired
locf
------
1

View File

@ -18,7 +18,6 @@ SELECT
FROM (VALUES (now(),1),(now(),NULL),(now(),NULL)) as t(time,c2)
GROUP BY 1
ORDER BY 1;
WARNING: Timescale License expired
QUERY PLAN
-----------------------------------------------------------------------------------------
Custom Scan (GapFill)

View File

@ -18,7 +18,6 @@ SELECT
FROM (VALUES (now(),1),(now(),NULL),(now(),NULL)) as t(time,c2)
GROUP BY 1
ORDER BY 1;
WARNING: Timescale License expired
QUERY PLAN
-----------------------------------------------------------------------------------------
Custom Scan (GapFill)

View File

@ -18,7 +18,6 @@ SELECT
FROM (VALUES (now(),1),(now(),NULL),(now(),NULL)) as t(time,c2)
GROUP BY 1
ORDER BY 1;
WARNING: Timescale License expired
QUERY PLAN
-----------------------------------------------------------------------------------------
Custom Scan (GapFill)

View File

@ -205,7 +205,6 @@ SELECT * FROM test.show_indexes('_timescaledb_internal._hyper_1_2_chunk');
\set ON_ERROR_STOP 0
-- cannot reorder a if with no index of the first call
SELECT reorder_chunk('_timescaledb_internal._hyper_1_2_chunk', verbose => TRUE);
WARNING: Timescale License expired
ERROR: there is no previously clustered index for table "_hyper_1_2_chunk"
\set ON_ERROR_STOP 1
BEGIN;
@ -1379,6 +1378,5 @@ WHERE indisclustered = true ORDER BY 1;
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER_2
\set ON_ERROR_STOP 0
SELECT reorder_chunk('_timescaledb_internal._hyper_2_3_chunk', verbose => TRUE);
WARNING: Timescale License expired
ERROR: must be owner of hypertable "ct2"
\set ON_ERROR_STOP 1

View File

@ -45,7 +45,6 @@ NOTICE: adding not-null constraint to column "time"
CREATE INDEX second_index on test_table (time);
CREATE INDEX third_index on test_table (time);
select add_reorder_policy('test_table', 'test_table_time_idx') as job_id \gset
WARNING: Timescale License expired
-- Noop for duplicate policy
select add_reorder_policy('test_table', 'test_table_time_idx', true);
NOTICE: reorder policy already exists on hypertable "test_table", skipping
@ -159,35 +158,35 @@ NOTICE: drop chunks policy already exists on hypertable "test_table", skipping
-- Should not add new policy with different parameters
select add_drop_chunks_policy('test_table', INTERVAL '3 month', false, true);
WARNING: could not add drop_chunks policy due to existing policy on hypertable with different arguments
WARNING: could not add drop chunks policy due to existing policy on hypertable with different arguments
add_drop_chunks_policy
------------------------
-1
(1 row)
select add_drop_chunks_policy('test_table', INTERVAL '1 year', if_not_exists => true);
WARNING: could not add drop_chunks policy due to existing policy on hypertable with different arguments
WARNING: could not add drop chunks policy due to existing policy on hypertable with different arguments
add_drop_chunks_policy
------------------------
-1
(1 row)
select add_drop_chunks_policy('test_table', INTERVAL '3 days', if_not_exists => true);
WARNING: could not add drop_chunks policy due to existing policy on hypertable with different arguments
WARNING: could not add drop chunks policy due to existing policy on hypertable with different arguments
add_drop_chunks_policy
------------------------
-1
(1 row)
select add_drop_chunks_policy('test_table', INTERVAL '3 days', true, if_not_exists => true);
WARNING: could not add drop_chunks policy due to existing policy on hypertable with different arguments
WARNING: could not add drop chunks policy due to existing policy on hypertable with different arguments
add_drop_chunks_policy
------------------------
-1
(1 row)
select add_drop_chunks_policy('test_table', INTERVAL '3 days', if_not_exists => true, cascade_to_materializations => true);
WARNING: could not add drop_chunks policy due to existing policy on hypertable with different arguments
WARNING: could not add drop chunks policy due to existing policy on hypertable with different arguments
add_drop_chunks_policy
------------------------
-1
@ -267,7 +266,6 @@ select r.job_id,r.hypertable_id,r.older_than,r.cascade from _timescaledb_config.
(0 rows)
select remove_reorder_policy('test_table');
WARNING: Timescale License expired
remove_reorder_policy
-----------------------
@ -320,21 +318,21 @@ select * from _timescaledb_config.bgw_policy_drop_chunks;
-- Should not add new policy with different parameters
select add_drop_chunks_policy('test_table_int', 2, false, true);
WARNING: could not add drop_chunks policy due to existing policy on hypertable with different arguments
WARNING: could not add drop chunks policy due to existing policy on hypertable with different arguments
add_drop_chunks_policy
------------------------
-1
(1 row)
select add_drop_chunks_policy('test_table_int', 1, false, true, true);
WARNING: could not add drop_chunks policy due to existing policy on hypertable with different arguments
WARNING: could not add drop chunks policy due to existing policy on hypertable with different arguments
add_drop_chunks_policy
------------------------
-1
(1 row)
select add_drop_chunks_policy('test_table_int', 1, true, true, false);
WARNING: could not add drop_chunks policy due to existing policy on hypertable with different arguments
WARNING: could not add drop chunks policy due to existing policy on hypertable with different arguments
add_drop_chunks_policy
------------------------
-1
@ -647,7 +645,6 @@ select c.id from _timescaledb_catalog.chunk as c, _timescaledb_catalog.hypertabl
select c.id as chunk_id from _timescaledb_catalog.chunk as c, _timescaledb_catalog.hypertable as h where c.hypertable_id=h.id and h.table_name='test_table' ORDER BY c.id LIMIT 1 \gset
select add_reorder_policy('test_table', 'second_index') as job_id \gset
WARNING: Timescale License expired
-- Simulate reorder job running and setting this stat row
select ts_test_chunk_stats_insert(:job_id, :chunk_id, 1);
ts_test_chunk_stats_insert
@ -877,7 +874,6 @@ UPDATE _timescaledb_internal.bgw_job_stat SET last_finish = '2003-01-01:01:01:01
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER
--not changing the interval doesn't change the next_start
select * from alter_job_schedule(:job_id, schedule_interval=>'20 min');
WARNING: Timescale License expired
job_id | schedule_interval | max_runtime | max_retries | retry_period | next_start
--------+-------------------+------------------+-------------+--------------+------------------------------
1014 | @ 20 mins | @ 7 mins 36 secs | 20 | @ 33 hours | Tue Jan 01 01:01:01 2002 PST
@ -936,27 +932,16 @@ select remove_reorder_policy('test_table');
\c :TEST_DBNAME :ROLE_SUPERUSER
set session timescaledb.license_key='Community';
-- Now make sure everything fails in the Community (non-enterprise) edition
-- Test for failure cases
\set ON_ERROR_STOP 0
select add_reorder_policy('test_table', 'test_table_time_idx');
ERROR: cannot execute an enterprise function with an invalid enterprise license
select add_drop_chunks_policy('test_table', INTERVAL '4 months', true);
ERROR: cannot execute an enterprise function with an invalid enterprise license
select remove_reorder_policy('test_table');
ERROR: cannot execute an enterprise function with an invalid enterprise license
select remove_drop_chunks_policy('test_table');
ERROR: cannot execute an enterprise function with an invalid enterprise license
select alter_job_schedule(12345);
ERROR: cannot alter policy schedule, policy #12345 not found
\set ON_ERROR_STOP 1
\c :TEST_DBNAME :ROLE_SUPERUSER
select add_reorder_policy('test_table', 'test_table_time_idx') as reorder_job_id \gset
WARNING: Timescale License expired
select add_drop_chunks_policy('test_table', INTERVAL '4 months', true) as drop_chunks_job_id \gset
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER_2
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER_2
\set ON_ERROR_STOP 0
select from alter_job_schedule(:reorder_job_id, max_runtime => NULL);
WARNING: Timescale License expired
ERROR: insufficient permssions to alter job 1015
select from alter_job_schedule(:drop_chunks_job_id, max_runtime => NULL);
ERROR: insufficient permssions to alter job 1016

View File

@ -7,8 +7,6 @@ time temp location
1 23.4 1
11 21.3 2
21 19.5 3
WARNING: Timescale License expired
HINT: Your license expired on Sun Sep 30 17:00:00 2018 PDT. Renew your license to continue using enterprise features.
step R1: SELECT reorder_chunk_i((SELECT show_chunks('ts_reorder_test') LIMIT 1), 'ts_reorder_test_time_idx', wait_on => 'waiter'); <waiting ...>
step Bc: ROLLBACK;
step S2: INSERT INTO ts_reorder_test VALUES (1, 23.4, 1);

View File

@ -4,8 +4,6 @@ starting permutation: Bc I1 Ic R1 Rc
step Bc: COMMIT;
step I1: INSERT INTO ts_reorder_test VALUES (1, 19.5, 3);
step Ic: COMMIT;
WARNING: Timescale License expired
HINT: Your license expired on Sun Sep 30 17:00:00 2018 PDT. Renew your license to continue using enterprise features.
step R1: SELECT reorder_chunk_i((SELECT show_chunks('ts_reorder_test') LIMIT 1), 'ts_reorder_test_time_idx', wait_on => 'waiter');
reorder_chunk_i

View File

@ -3,8 +3,6 @@ Parsed test spec with 2 sessions
starting permutation: I1 Ic R1 Rc
step I1: INSERT INTO ts_reorder_test VALUES (11, 19.5, 3);
step Ic: COMMIT;
WARNING: Timescale License expired
HINT: Your license expired on Sun Sep 30 17:00:00 2018 PDT. Renew your license to continue using enterprise features.
step R1: SELECT reorder_chunk_i((SELECT show_chunks('ts_reorder_test') LIMIT 1), 'ts_reorder_test_time_idx');
reorder_chunk_i

View File

@ -9,8 +9,6 @@ time temp location
11 21.3 2
21 19.5 3
step Sc: COMMIT;
WARNING: Timescale License expired
HINT: Your license expired on Sun Sep 30 17:00:00 2018 PDT. Renew your license to continue using enterprise features.
step R1: SELECT reorder_chunk_i((SELECT show_chunks('ts_reorder_test') LIMIT 1), 'ts_reorder_test_time_idx', wait_on => 'waiter');
reorder_chunk_i

View File

@ -103,6 +103,7 @@ select remove_drop_chunks_policy('test_table');
select * from _timescaledb_catalog.dimension;
\c :TEST_DBNAME :ROLE_SUPERUSER
CREATE SCHEMA IF NOT EXISTS my_new_schema;
create or replace function my_new_schema.dummy_now2() returns BIGINT LANGUAGE SQL IMMUTABLE as 'SELECT 1::BIGINT';
grant execute on ALL FUNCTIONS IN SCHEMA my_new_schema to public;
@ -352,20 +353,15 @@ select remove_reorder_policy('test_table');
\c :TEST_DBNAME :ROLE_SUPERUSER
set session timescaledb.license_key='Community';
-- Now make sure everything fails in the Community (non-enterprise) edition
-- Test for failure cases
\set ON_ERROR_STOP 0
select add_reorder_policy('test_table', 'test_table_time_idx');
select add_drop_chunks_policy('test_table', INTERVAL '4 months', true);
select remove_reorder_policy('test_table');
select remove_drop_chunks_policy('test_table');
select alter_job_schedule(12345);
\set ON_ERROR_STOP 1
\c :TEST_DBNAME :ROLE_SUPERUSER
select add_reorder_policy('test_table', 'test_table_time_idx') as reorder_job_id \gset
select add_drop_chunks_policy('test_table', INTERVAL '4 months', true) as drop_chunks_job_id \gset
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER_2
\c :TEST_DBNAME :ROLE_DEFAULT_PERM_USER_2
\set ON_ERROR_STOP 0
select from alter_job_schedule(:reorder_job_id, max_runtime => NULL);
select from alter_job_schedule(:drop_chunks_job_id, max_runtime => NULL);