Ad Widget

Collapse

timescaledb: chunk has no dimension slices

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • einsibjani
    Junior Member
    • Sep 2019
    • 9

    #1

    timescaledb: chunk has no dimension slices

    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.
  • einsibjani
    Junior Member
    • Sep 2019
    • 9

    #2
    I discovered that if I add a constraint on clock column to my query, I get results. I guess that's why Zabbix UI keeps working, since there's always a constraint on the queries.

    Obviously something got messed up along the way, but at least I can see the data and have a good idea of why it keeps working in Zabbix

    Comment

    Working...