mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-31 01:15:18 +08:00
Commit 97c2578ffa6b08f733a75381defefc176c91826b overcomplicated the `invalidate_add_entry` API by adding parameters related to the remote function call for multi-node on materialization hypertables. Refactored it simplifying the function interface and adding a new function to deal with materialization hypertables on multi-node environment. Fixes #3833
90 lines
3.8 KiB
Plaintext
90 lines
3.8 KiB
Plaintext
-- This file and its contents are licensed under the Apache License 2.0.
|
|
-- Please see the included NOTICE for copyright information and
|
|
-- LICENSE-APACHE for a copy of the license.
|
|
\c :TEST_DBNAME :ROLE_SUPERUSER
|
|
\set ECHO queries
|
|
SHOW timescaledb.license;
|
|
timescaledb.license
|
|
---------------------
|
|
apache
|
|
(1 row)
|
|
|
|
SELECT _timescaledb_internal.tsl_loaded();
|
|
tsl_loaded
|
|
------------
|
|
f
|
|
(1 row)
|
|
|
|
SET timescaledb.license='apache';
|
|
ERROR: invalid value for parameter "timescaledb.license": "apache"
|
|
DETAIL: Cannot change a license in a running session.
|
|
HINT: Change the license in the configuration file or server command line.
|
|
SET timescaledb.license='timescale';
|
|
ERROR: invalid value for parameter "timescaledb.license": "timescale"
|
|
DETAIL: Cannot change a license in a running session.
|
|
HINT: Change the license in the configuration file or server command line.
|
|
SET timescaledb.license='something_else';
|
|
ERROR: invalid value for parameter "timescaledb.license": "something_else"
|
|
DETAIL: Unrecognized license type.
|
|
HINT: Supported license types are 'timescale' or 'apache'.
|
|
SELECT locf(1);
|
|
ERROR: function "locf" is not supported under the current "apache" license
|
|
HINT: Upgrade your license to 'timescale' to use this free community feature.
|
|
SELECT interpolate(1);
|
|
ERROR: function "interpolate" is not supported under the current "apache" license
|
|
HINT: Upgrade your license to 'timescale' to use this free community feature.
|
|
SELECT time_bucket_gapfill(1,1,1,1);
|
|
ERROR: function "time_bucket_gapfill" is not supported under the current "apache" license
|
|
HINT: Upgrade your license to 'timescale' to use this free community feature.
|
|
CREATE OR REPLACE FUNCTION custom_func(jobid int, args jsonb) RETURNS VOID AS $$
|
|
DECLARE
|
|
BEGIN
|
|
END;
|
|
$$ LANGUAGE plpgsql;
|
|
SELECT add_job('custom_func','1h', config:='{"type":"function"}'::jsonb);
|
|
ERROR: function "add_job" is not supported under the current "apache" license
|
|
HINT: Upgrade your license to 'timescale' to use this free community feature.
|
|
DROP FUNCTION custom_func;
|
|
CREATE TABLE metrics(time timestamptz NOT NULL, value float);
|
|
SELECT create_hypertable('metrics', 'time');
|
|
create_hypertable
|
|
----------------------
|
|
(1,public,metrics,t)
|
|
(1 row)
|
|
|
|
ALTER TABLE metrics SET (timescaledb.compress);
|
|
ERROR: functionality not supported under the current "apache" license
|
|
HINT: Upgrade your license to 'timescale' to use this free community feature.
|
|
INSERT INTO metrics
|
|
VALUES ('2022-01-01 00:00:00', 1), ('2022-01-01 01:00:00', 2), ('2022-01-01 02:00:00', 3);
|
|
CREATE MATERIALIZED VIEW metrics_hourly
|
|
WITH (timescaledb.continuous) AS
|
|
SELECT time_bucket(INTERVAL '1 hour', time) AS bucket,
|
|
AVG(value),
|
|
MAX(value),
|
|
MIN(value)
|
|
FROM metrics
|
|
GROUP BY bucket
|
|
WITH NO DATA;
|
|
ERROR: functionality not supported under the current "apache" license
|
|
HINT: Upgrade your license to 'timescale' to use this free community feature.
|
|
CREATE MATERIALIZED VIEW metrics_hourly
|
|
AS
|
|
SELECT time_bucket(INTERVAL '1 hour', time) AS bucket,
|
|
AVG(value),
|
|
MAX(value),
|
|
MIN(value)
|
|
FROM metrics
|
|
GROUP BY bucket;
|
|
CALL refresh_continuous_aggregate('metrics_hourly', NULL, NULL);
|
|
ERROR: function "refresh_continuous_aggregate" is not supported under the current "apache" license
|
|
HINT: Upgrade your license to 'timescale' to use this free community feature.
|
|
SELECT _timescaledb_internal.invalidation_hyper_log_add_entry(0, 0, 0);
|
|
ERROR: function "invalidation_hyper_log_add_entry" is not supported under the current "apache" license
|
|
HINT: Upgrade your license to 'timescale' to use this free community feature.
|
|
SELECT _timescaledb_internal.invalidation_cagg_log_add_entry(0, 0, 0);
|
|
ERROR: function "invalidation_cagg_log_add_entry" is not supported under the current "apache" license
|
|
HINT: Upgrade your license to 'timescale' to use this free community feature.
|
|
DROP MATERIALIZED VIEW metrics_hourly;
|
|
DROP TABLE metrics;
|