-
Problem report
-
Resolution: Won't Do
-
Trivial
-
None
-
5.0.2
-
None
-
CentOS 7
Steps to reproduce:
- I followed steps written in the documentation for setting timescaledb on my postgreSQL. (https://www.zabbix.com/documentation/current/manual/appendix/install/timescaledb)
- PostgreSQL 12
- Zabbix 5.0.2
- TimescaleDB 1.7
Result:
6467:20200723:141708.433 [Z3005] query failed: [0] PGRES_FATAL_ERROR:ERROR: integer_now_func not set on hypertable "history" [select add_compress_chunks_policy('history', integer '612000')] 6467:20200723:141708.433 failed to add compression policy to table 'history'
It did also for tables trends, trends_unit, history_log, history_text, history_text, history_uint.
Expected:
Compression for given tables, but that didn't happen, until I run those commands in psql terminal.
CREATE OR REPLACE FUNCTION unix_now() returns BIGINT LANGUAGE SQL STABLE as $$ SELECT extract(epoch from now())::BIGINT $$; SELECT set_integer_now_func('history', 'unix_now'); SELECT set_integer_now_func('trends', 'unix_now'); // and for other tables mentioned in timescaledb.sql
I am asking you to confirm that issue and its' solution and possibly add this patch to the timescaledb.sql.