I've been running Zabbix with postgresql+timescaledb for over a year.
Recently I discovered that I had the zabbix tables in zabbixdb schema, while the timescaledb extension was installed in the public schema.
I guess in the beginning I managed to install the extension in the zabbixdb schema, since there where timescaledb functions there, but all upgrades of the timescaledb extention where on public schema.
Finally I discovered that housekeeping hadn't been dropping any chunks because it was calling a function that didn't exist in the schema.
I tried to fix it by moving all the tables to the public schema `ALTER TABLE ... SET SCHEMA ...`
It fixed the problem with housekeeping, the next run freed up ~300 GB of space, but now I have a new and more serious problem.
I can't run any query from psql. Any query on any of the hypertables, except auditlog (I ran the script that converts it to a hypertable after moving it to public schema) gives this error:
`ERROR: chunk _hyper_1_1503_chunk has no dimension slices`
The strange thing is that zabbix doesn't mind and is working fine. New data keeps flowing in and and I can view it just fine in the web UI.
So how is Zabbix running queries differently from psql? I really don't want to have to drop all the tables and start from scratch.
Recently I discovered that I had the zabbix tables in zabbixdb schema, while the timescaledb extension was installed in the public schema.
I guess in the beginning I managed to install the extension in the zabbixdb schema, since there where timescaledb functions there, but all upgrades of the timescaledb extention where on public schema.
Finally I discovered that housekeeping hadn't been dropping any chunks because it was calling a function that didn't exist in the schema.
I tried to fix it by moving all the tables to the public schema `ALTER TABLE ... SET SCHEMA ...`
It fixed the problem with housekeeping, the next run freed up ~300 GB of space, but now I have a new and more serious problem.
I can't run any query from psql. Any query on any of the hypertables, except auditlog (I ran the script that converts it to a hypertable after moving it to public schema) gives this error:
`ERROR: chunk _hyper_1_1503_chunk has no dimension slices`
The strange thing is that zabbix doesn't mind and is working fine. New data keeps flowing in and and I can view it just fine in the web UI.
So how is Zabbix running queries differently from psql? I really don't want to have to drop all the tables and start from scratch.
Comment