Timescaledb: ERROR: cannot call chunk_get_chunks_in_time_range on a compressed hypertable although compresssion off

Created on 5 Nov 2019  路  8Comments  路  Source: timescale/timescaledb

Relevant system information:

  • OS: CentOS 7.7
  • PostgreSQL version: 11.5-1
  • TimescaleDB version: 1.5.0
  • Installation method: rpm

Describe the bug
error cannot call chunk_get_chunks_in_time_range on a compressed hypertabl on all hypertable although compresssion off

zabbix=# SELECT show_chunks('history_uint');
ERROR: cannot call chunk_get_chunks_in_time_range on a compressed hypertable

zabbix=# SELECT table_name,compressed FROM _timescaledb_catalog.hypertable ;
table_name | compressed
--------------+------------
history | f
history_uint | f
history_log | f
history_text | f
history_str | f
trends | f
trends_uint | f
(7 rows)

To Reproduce
update timescaledb to version 1.5.0

bug investigate

Most helpful comment

@perhamm @jermudgeon Please try running VACUUM FULL _timescaledb_catalog.hypertable; Let us know if that fixes the problem

All 8 comments

Also on 1.5.0.

If I don't specify a hypertable, I get the error above.

If I specify a hypertable (either compressed or no), I get the expected results.

@perhamm @jermudgeon Please try running VACUUM FULL _timescaledb_catalog.hypertable; Let us know if that fixes the problem

@perhamm @jermudgeon Please try running VACUUM FULL _timescaledb_catalog.hypertable; Let us know if that fixes the problem

Unfortunately that produces no change for me. Still get "cannot call chunk_get_chunks_in_time_range", etc.

Thank you so much @cevian :)

Your advice solved my problem.

timescaledb | 1.5.0 | public | Enables scalable inserts and complex queries for time-series data
(3 rows)

zabbix=# VACUUM FULL _timescaledb_catalog.hypertable;

VACUUM

zabbix=# SELECT drop_chunks(1541614618,'trends_uint');

drop_chunks

------------------------------------------

_timescaledb_internal._hyper_7_850_chunk

_timescaledb_internal._hyper_7_852_chunk

(2 rows)

@jermudgeon can you please provide the result of SELECT * FROM _timescaledb_catalog.hypertable;

@jermudgeon can you please provide the result of SELECT * FROM _timescaledb_catalog.hypertable;

id|schema_name |table_name |associated_schema_name|associated_table_prefix|num_dimensions|chunk_sizing_func_schema|chunk_sizing_func_name |chunk_target_size|compressed|compressed_hypertable_id| --|---------------------|-------------------------|----------------------|-----------------------|--------------|------------------------|------------------------|-----------------|----------|------------------------| 3|public |event_log |_timescaledb_internal |_hyper_3 | 2|_timescaledb_internal |calculate_chunk_interval| 0|false | | 4|public |alarms |_timescaledb_internal |_hyper_4 | 2|_timescaledb_internal |calculate_chunk_interval| 0|false | | 5|public |syslog |_timescaledb_internal |_hyper_5 | 2|_timescaledb_internal |calculate_chunk_interval| 0|false | | 6|public |snmp_trap_log |_timescaledb_internal |_hyper_6 | 2|_timescaledb_internal |calculate_chunk_interval| 0|false | | 8|public |idata_sc_7 |_timescaledb_internal |_hyper_8 | 2|_timescaledb_internal |calculate_chunk_interval| 0|false | | 19|_timescaledb_internal|_compressed_hypertable_19|_timescaledb_internal |_hyper_19 | 0|_timescaledb_internal |calculate_chunk_interval| 0|true | | 12|public |idata_sc_other |_timescaledb_internal |_hyper_12 | 2|_timescaledb_internal |calculate_chunk_interval| 0|false | 19| 20|_timescaledb_internal|_compressed_hypertable_20|_timescaledb_internal |_hyper_20 | 0|_timescaledb_internal |calculate_chunk_interval| 0|true | | 10|public |idata_sc_90 |_timescaledb_internal |_hyper_10 | 2|_timescaledb_internal |calculate_chunk_interval| 0|false | 21| 9|public |idata_sc_30 |_timescaledb_internal |_hyper_9 | 2|_timescaledb_internal |calculate_chunk_interval| 0|false | 22| 11|public |idata_sc_180 |_timescaledb_internal |_hyper_11 | 2|_timescaledb_internal |calculate_chunk_interval| 0|false | 23| 18|public |tdata_sc_other |_timescaledb_internal |_hyper_18 | 2|_timescaledb_internal |calculate_chunk_interval| 0|false | 34| 13|public |tdata_sc_default |_timescaledb_internal |_hyper_13 | 2|_timescaledb_internal |calculate_chunk_interval| 0|false | 33| 14|public |tdata_sc_7 |_timescaledb_internal |_hyper_14 | 2|_timescaledb_internal |calculate_chunk_interval| 0|false | 31| 15|public |tdata_sc_30 |_timescaledb_internal |_hyper_15 | 2|_timescaledb_internal |calculate_chunk_interval| 0|false | 30| 17|public |tdata_sc_180 |_timescaledb_internal |_hyper_17 | 2|_timescaledb_internal |calculate_chunk_interval| 0|false | 29| 16|public |tdata_sc_90 |_timescaledb_internal |_hyper_16 | 2|_timescaledb_internal |calculate_chunk_interval| 0|false | 32| 7|public |idata_sc_default |_timescaledb_internal |_hyper_7 | 2|_timescaledb_internal |calculate_chunk_interval| 0|false | 20| 21|_timescaledb_internal|_compressed_hypertable_21|_timescaledb_internal |_hyper_21 | 0|_timescaledb_internal |calculate_chunk_interval| 0|true | | 22|_timescaledb_internal|_compressed_hypertable_22|_timescaledb_internal |_hyper_22 | 0|_timescaledb_internal |calculate_chunk_interval| 0|true | | 23|_timescaledb_internal|_compressed_hypertable_23|_timescaledb_internal |_hyper_23 | 0|_timescaledb_internal |calculate_chunk_interval| 0|true | | 29|_timescaledb_internal|_compressed_hypertable_29|_timescaledb_internal |_hyper_29 | 0|_timescaledb_internal |calculate_chunk_interval| 0|true | | 30|_timescaledb_internal|_compressed_hypertable_30|_timescaledb_internal |_hyper_30 | 0|_timescaledb_internal |calculate_chunk_interval| 0|true | | 31|_timescaledb_internal|_compressed_hypertable_31|_timescaledb_internal |_hyper_31 | 0|_timescaledb_internal |calculate_chunk_interval| 0|true | | 32|_timescaledb_internal|_compressed_hypertable_32|_timescaledb_internal |_hyper_32 | 0|_timescaledb_internal |calculate_chunk_interval| 0|true | | 33|_timescaledb_internal|_compressed_hypertable_33|_timescaledb_internal |_hyper_33 | 0|_timescaledb_internal |calculate_chunk_interval| 0|true | | 34|_timescaledb_internal|_compressed_hypertable_34|_timescaledb_internal |_hyper_34 | 0|_timescaledb_internal |calculate_chunk_interval| 0|true | |

Going to mark this as resolved. @jermudgeon's error is better described in #1535 which will remain open. This original error is solved in 1.5.1.

@jermudgeon thank you for the info very helpful. This will be fixed in #1535.

Was this page helpful?
0 / 5 - 0 ratings