[ZBX-20743] Compression with Apache licensed TimescaleDB 2.x Created: 2022 Mar 14  Updated: 2024 Apr 19  Resolved: 2022 Jul 19

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Documentation (D), Frontend (F), Server (S)
Affects Version/s: None
Fix Version/s: 5.0.26rc1, 6.0.7rc1, 6.2.1rc1, 6.4.0alpha1, 6.4 (plan)

Type: Problem report Priority: Major
Reporter: Edgar Akhmetshin Assignee: Antons Sincovs
Resolution: Fixed Votes: 5
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File 2.png     PNG File disabled.png     PNG File image-2022-06-14-10-38-30-793.png    
Issue Links:
Causes
causes ZBX-22075 After Upgrading to 6.0.12 from 6.0.5 ... Closed
causes ZBX-21358 Update server TimescaleDB supported u... Closed
causes ZBX-21890 config.dbversion_status contains seco... Closed
causes ZBX-22536 Selected compression checkbox for apa... Closed
Duplicate
Sub-task
depends on ZBX-20878 TSDB version Closed
Team: Team B
Sprint: Sprint 90 (Jul 2022)
Story Points: 2

 Description   

Steps to reproduce:

  1. Install timescaledb extension from official postgresql repo instead of timescaledb provided
  2. try to use compression
     16737:20220314:111150.042 [Z3005] query failed: [0] PGRES_FATAL_ERROR:ERROR:  functionality not supported under the current "apache" license
    HINT:  Upgrade your license to 'timescale' to use this free community feature.
     [alter table history set (timescaledb.compress,timescaledb.compress_segmentby='itemid',timescaledb.compress_orderby='clock,ns')]
     16737:20220314:111150.043 [Z3005] query failed: [0] PGRES_FATAL_ERROR:ERROR:  function "add_compression_policy" is not supported under the current "apache" license
    HINT:  Upgrade your license to 'timescale' to use this free community feature.
     [select add_compression_policy('history', integer '612000')]
     16737:20220314:111150.043 failed to add compression policy to table 'history'
    

This is correct, but in documentation where is no information about TSL licensed library requirements, all community packages are provided with only Apache licensed module.

-rwxr-xr-x  1 root root 6007552 Mar 14 12:31 timescaledb-2.6.0.so

# not provided by default with community packages:
-rwxr-xr-x  1 root root 6379480 Mar 14 12:31 timescaledb-tsl-2.6.0.so

So the following will fail with:

ALTER SYSTEM SET timescaledb.license = 'timescale';

 ERROR: could not access file "$libdir/timescaledb-tsl-2.6.0": No such file or directory

https://www.zabbix.com/documentation/current/en/manual/appendix/install/timescaledb#timescaledb-compression

Expected:

  1. Fatal error is not handled like fatal and frontend keeps "thinking" that compression can be used;
  2. Not all timescaledb library packages are made equally, community based versions from official postgresql repo or distro version like provided in SUSE/openSUSE are build only with Apache licenses - so it's good to mention in the docs to have full featured TSDB version (without APACHE_ONLY=1 build);

<mprihodko> Documentation changes can be combined with ZBX-20878



 Comments   
Comment by Kris Avi [ 2022 May 11 ]

I have to correct you about Postgres repo and tsl timescaledb. There is tsl version in non-free pgdg repo. For example RedHat8 https://download.postgresql.org/pub/repos/yum/non-free/14/redhat/rhel-8-x86_64/. If you were to follow self-hosted installation guide on timescale page, then you will get the TSL version as well. 

 

If I am correct, then compression used to work on apache license version and I would guess the documentation was written back then. Could use some improvement in documentation and capabilities checking in timescaleDB now.

 <mprihodko> Thank you for pointing this out. We are currently improving TimescaleDB compression capability check in Zabbix code. We are also planning to improve documentation.

Comment by Mihails Prihodko [ 2022 Jun 29 ]

Available in:

Generated at Thu May 29 10:09:34 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.