Upgrade your license to 'timescale' to use this free community feature

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.

1 Like

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!

1 Like