I’m building TimeScale on FreeBSD from sources, and I’ve built a (limited) Apache 2.0 version. How do I upgrade my license to ‘timescale’?
I’ve googled for some time, but found nothing on the subject.
Hello @tarkhil
I believe you should be able to set timescaledb.license_key
to CommunityLicense
in your postgresql.conf file. If that results in errors along the lines of ERROR: function "compress_chunk" is not supported under the current license "CommunityLicense"
when you try to use community features then drop back here and I’ll see if I can get you more info.
Could you confirm the version of TimescaleDB too if you have problems? Thanks.
2.7.0
From postgresql.conf:
# - Shared Library Preloading -
shared_preload_libraries = 'timescaledb.so' # (change requires restart)
timescaledb.license_key='CommunityLicense'
But…
algo_trader=# SET timescaledb.license_key='CommunityLicense';
SET
algo_trader=# select add_retention_policy('candles_1h', interval '14 days');
ERROR: function "add_retention_policy" is not supported under the current "apache" license
HINT: Upgrade your license to 'timescale' to use this free community feature.
algo_trader=#
algo_trader=# set session timescaledb.license_key='Community';
SET
algo_trader=# select add_retention_policy('candles_1h', interval '14 days');
ERROR: function "add_retention_policy" is not supported under the current "apache" license
HINT: Upgrade your license to 'timescale' to use this free community feature.
algo_trader=# alter database algo_trader SET timescaledb.license_key='Community';
ALTER DATABASE
algo_trader=# select add_retention_policy('candles_1h', interval '14 days');
ERROR: function "add_retention_policy" is not supported under the current "apache" license
HINT: Upgrade your license to 'timescale' to use this free community feature.
algo_trader=#
In the code from GitHub, I did not found any mention to enable those functions; they are just hardcoded out. Is Community edition distributed in binaries only? Or should I try different repo?
It should be possible to build the community edition from source. From what I can tell, that should even be the default.
To be clear, to disable the timescale-license code when building from source, you would run ./bootstrap -DAPACHE_ONLY=1
, (and then cd build && make
). Is it possible that you did that?
When the timescale-license code is enabled, then you should see something like [100%] Built target timescaledb-tsl
at the end of the build log. When disabled, you would only see [100%] Built target timescaledb
.
Whooops. I have unchecked the checkbox. Silly me. Sorry.
Whooops. I have unchecked the checkbox. Silly me. Sorry.
I’m not sure that I understand. Did I answer your question?
Yes. I was using FreeBSD ports system and accidently unchecked TSL license activation!
… and here we are, again.
I have to Debian 10 boxes, one running Postgres 12 and Timescaledb (timescaledb-2-postgresql-12/buster,now 2.7.1, from packagecloud repo, second running Postgres 14 and timescaledb-2-oss-2.8.1-postgresql-14/buster
Now…
hypertable=# begin;
BEGIN
hypertable=*# CREATE EXTENSION IF NOT EXISTS timescaledb;
WARNING:
WELCOME TO
_____ _ _ ____________
|_ _(_) | | | _ \ ___ \
| | _ _ __ ___ ___ ___ ___ __ _| | ___| | | | |_/ /
| | | | _ ` _ \ / _ \/ __|/ __/ _` | |/ _ \ | | | ___ \
| | | | | | | | | __/\__ \ (_| (_| | | __/ |/ /| |_/ /
|_| |_|_| |_| |_|\___||___/\___\__,_|_|\___|___/ \____/
Running version 2.8.1
For more information on TimescaleDB, please visit the following links:
(omitted to keep links count)
Note: TimescaleDB collects anonymous reports to better understand and assist our users.
For more information and how to disable, please see our docs https://docs.timescale.com/timescaledb/latest/how-to-guides/configuration/telemetry.
CREATE EXTENSION
hypertable=*# create table hypertable (like hypertable_p including all);
CREATE TABLE
hypertable=*# alter table hypertable alter column ts type timestamp USING to_timestamp(ts);
ALTER TABLE
hypertable=*# select create_hypertable('hypertable', 'ts', chunk_time_interval => interval '1 day');
create_hypertable
-------------------------
(1,public,hypertable,t)
(1 row)
hypertable=*# select add_continuous_aggregate_policy('hypertable', start_offset => NULL, end_offset => INTERVAL '1 h', schedule_interval => INTERVAL '1 h');
ERROR: function "add_continuous_aggregate_policy" is not supported under the current "apache" license
HINT: Upgrade your license to 'timescale' to use this free community feature.
hypertable=!# rollback;
ROLLBACK
hypertable=#
License IS set to community. Timescale installed from https://packagecloud.io/timescale/timescaledb/debian/, postgres from Index of /pub/repos/apt/
I’ve removed timescaledb, verified that no shared library remains, reinstalled and restarted.
The same problem.
Got it. I needed not oss package!