Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: license errors in v2.18.1 while autovacuuming chunks with hypercore access method #7702

Closed
jflambert opened this issue Feb 13, 2025 · 4 comments · Fixed by #7711
Closed
Assignees
Labels

Comments

@jflambert
Copy link

jflambert commented Feb 13, 2025

What type of bug is this?

Unexpected error

What subsystems and features are affected?

Compression (only with hypercore access method)

What happened?

Even though my license is correctly set to timescale, I get frequent autovacuum errors about an invalid license.

variation 1 (while autovacuuming uncompressed chunks)

[:342]ERROR:  function "ts_hypercore_handler" is not supported under the current "timescale" license
[:342]HINT:  Upgrade your license to 'timescale' to use this free community feature.
[:342]CONTEXT:  automatic vacuum of table "reporting._timescaledb_internal._hyper_2_3_chunk"

variation 2 (while autovacuuming compressed chunks)

[10398] ERROR:  function "amvacuumcleanup" is not defined for index "compress_hyper_15_60_chunk_ts_hypercore_proxy_idx"
[10398] CONTEXT:  while cleaning up index "compress_hyper_15_60_chunk_ts_hypercore_proxy_idx" of relation "_timescaledb_internal.compress_hyper_15_60_chunk"
        automatic vacuum of table "reporting._timescaledb_internal.compress_hyper_15_60_chunk"
[10398] ERROR:  function "ts_hypercore_handler" is not supported under the current "timescale" license
[10398] HINT:  Upgrade your license to 'timescale' to use this free community feature.
# show timescaledb.license;
 timescaledb.license 
---------------------
 timescale
(1 row)

TimescaleDB version affected

2.18.0, 2.18.1

PostgreSQL version used

16.6

What operating system did you use?

timescaledb-ha:pg16.6-ts2.18.1

What installation method did you use?

Docker

What platform did you run on?

On prem/Self-hosted

How can we reproduce the bug?

Insert 7 million records from the past (February 01-11). Notice the hypercore access method in order to use b-tree indexes as described by @mkindahl. If the hypercore am isn't used, there is no autovacuuming bug.

DROP TABLE IF EXISTS test_signals;
CREATE TABLE test_signals
(
    device_id uuid NOT NULL,
    channel text NOT NULL,
    signal text NOT NULL,
    signal_timestamp TIMESTAMPTZ NOT NULL,
    value float NOT NULL,
    PRIMARY KEY (device_id, channel, signal, signal_timestamp)
);
SELECT create_hypertable('test_signals', 'signal_timestamp', CHUNK_TIME_INTERVAL => INTERVAL '1 DAY');

ALTER TABLE test_signals SET (
  timescaledb.enable_columnstore,
  timescaledb.segmentby='device_id',
  timescaledb.orderby='channel, signal, signal_timestamp DESC'
);
ALTER TABLE test_signals SET ACCESS METHOD hypercore; -- critical for index support

INSERT INTO test_signals(channel, device_id, signal_timestamp, signal, value)
SELECT 'chan', device_ids, signal_timestamps, signals, random()*100
FROM UNNEST(ARRAY[gen_random_uuid(), gen_random_uuid(), gen_random_uuid()]) AS device_ids,
GENERATE_SERIES('2025-02-01', '2025-02-11', '1 second'::INTERVAL) AS signal_timestamps,
UNNEST(ARRAY['signal1', 'signal_longer_name_2', 'signal_much_much_longer_name_3']::TEXT[]) AS signals;

This runs for about 30 seconds on my side. I get the following errors in the postgres logs almost immediately after the insert ends.

2025-02-13 14:52:19.576 UTC [151] ERROR:  function "ts_hypercore_handler" is not supported under the current "timescale" license
2025-02-13 14:52:19.576 UTC [151] HINT:  Upgrade your license to 'timescale' to use this free community feature.
2025-02-13 14:52:19.576 UTC [151] CONTEXT:  automatic vacuum of table "reporting._timescaledb_internal._hyper_8_3_chunk"
2025-02-13 14:52:19.576 UTC [151] ERROR:  function "ts_hypercore_handler" is not supported under the current "timescale" license
2025-02-13 14:52:19.576 UTC [151] HINT:  Upgrade your license to 'timescale' to use this free community feature.
2025-02-13 14:52:19.576 UTC [151] CONTEXT:  automatic vacuum of table "reporting._timescaledb_internal._hyper_8_5_chunk"
2025-02-13 14:52:19.576 UTC [151] ERROR:  function "ts_hypercore_handler" is not supported under the current "timescale" license
2025-02-13 14:52:19.576 UTC [151] HINT:  Upgrade your license to 'timescale' to use this free community feature.
2025-02-13 14:52:19.576 UTC [151] CONTEXT:  automatic vacuum of table "reporting._timescaledb_internal._hyper_8_7_chunk"
2025-02-13 14:52:19.576 UTC [151] ERROR:  function "ts_hypercore_handler" is not supported under the current "timescale" license
2025-02-13 14:52:19.576 UTC [151] HINT:  Upgrade your license to 'timescale' to use this free community feature.
2025-02-13 14:52:19.576 UTC [151] CONTEXT:  automatic vacuum of table "reporting._timescaledb_internal._hyper_8_9_chunk"
2025-02-13 14:52:19.615 UTC [151] ERROR:  function "ts_hypercore_handler" is not supported under the current "timescale" license
2025-02-13 14:52:19.615 UTC [151] HINT:  Upgrade your license to 'timescale' to use this free community feature.
2025-02-13 14:52:19.615 UTC [151] CONTEXT:  automatic vacuum of table "reporting._timescaledb_internal._hyper_8_11_chunk"
2025-02-13 14:52:19.615 UTC [151] ERROR:  function "ts_hypercore_handler" is not supported under the current "timescale" license
2025-02-13 14:52:19.615 UTC [151] HINT:  Upgrade your license to 'timescale' to use this free community feature.
2025-02-13 14:52:19.615 UTC [151] CONTEXT:  automatic vacuum of table "reporting._timescaledb_internal._hyper_8_13_chunk"
2025-02-13 14:52:19.615 UTC [151] ERROR:  function "ts_hypercore_handler" is not supported under the current "timescale" license
2025-02-13 14:52:19.615 UTC [151] HINT:  Upgrade your license to 'timescale' to use this free community feature.
2025-02-13 14:52:19.615 UTC [151] CONTEXT:  automatic vacuum of table "reporting._timescaledb_internal._hyper_8_15_chunk"
2025-02-13 14:52:19.615 UTC [151] ERROR:  function "ts_hypercore_handler" is not supported under the current "timescale" license
2025-02-13 14:52:19.615 UTC [151] HINT:  Upgrade your license to 'timescale' to use this free community feature.
2025-02-13 14:52:19.615 UTC [151] CONTEXT:  automatic vacuum of table "reporting._timescaledb_internal._hyper_8_17_chunk"
2025-02-13 14:52:19.615 UTC [151] ERROR:  function "ts_hypercore_handler" is not supported under the current "timescale" license
2025-02-13 14:52:19.615 UTC [151] HINT:  Upgrade your license to 'timescale' to use this free community feature.
2025-02-13 14:52:19.615 UTC [151] CONTEXT:  automatic vacuum of table "reporting._timescaledb_internal._hyper_8_19_chunk"
2025-02-13 14:52:19.615 UTC [151] ERROR:  function "ts_hypercore_handler" is not supported under the current "timescale" license
2025-02-13 14:52:19.615 UTC [151] HINT:  Upgrade your license to 'timescale' to use this free community feature.
2025-02-13 14:52:19.615 UTC [151] CONTEXT:  automatic vacuum of table "reporting._timescaledb_internal._hyper_8_21_chunk"
2025-02-13 14:52:29.581 UTC [154] ERROR:  function "ts_hypercore_handler" is not supported under the current "timescale" license
2025-02-13 14:52:29.581 UTC [154] HINT:  Upgrade your license to 'timescale' to use this free community feature.
2025-02-13 14:52:29.581 UTC [154] CONTEXT:  automatic vacuum of table "reporting._timescaledb_internal._hyper_8_3_chunk"
2025-02-13 14:52:29.581 UTC [154] ERROR:  function "ts_hypercore_handler" is not supported under the current "timescale" license
2025-02-13 14:52:29.581 UTC [154] HINT:  Upgrade your license to 'timescale' to use this free community feature.
2025-02-13 14:52:29.581 UTC [154] CONTEXT:  automatic vacuum of table "reporting._timescaledb_internal._hyper_8_5_chunk"
2025-02-13 14:52:29.581 UTC [154] ERROR:  function "ts_hypercore_handler" is not supported under the current "timescale" license
2025-02-13 14:52:29.581 UTC [154] HINT:  Upgrade your license to 'timescale' to use this free community feature.
2025-02-13 14:52:29.581 UTC [154] CONTEXT:  automatic vacuum of table "reporting._timescaledb_internal._hyper_8_7_chunk"
2025-02-13 14:52:29.581 UTC [154] ERROR:  function "ts_hypercore_handler" is not supported under the current "timescale" license
2025-02-13 14:52:29.581 UTC [154] HINT:  Upgrade your license to 'timescale' to use this free community feature.
2025-02-13 14:52:29.581 UTC [154] CONTEXT:  automatic vacuum of table "reporting._timescaledb_internal._hyper_8_9_chunk"
2025-02-13 14:52:29.581 UTC [154] ERROR:  function "ts_hypercore_handler" is not supported under the current "timescale" license
2025-02-13 14:52:29.581 UTC [154] HINT:  Upgrade your license to 'timescale' to use this free community feature.
2025-02-13 14:52:29.581 UTC [154] CONTEXT:  automatic vacuum of table "reporting._timescaledb_internal._hyper_8_11_chunk"
2025-02-13 14:52:29.581 UTC [154] ERROR:  function "ts_hypercore_handler" is not supported under the current "timescale" license
2025-02-13 14:52:29.581 UTC [154] HINT:  Upgrade your license to 'timescale' to use this free community feature.
2025-02-13 14:52:29.581 UTC [154] CONTEXT:  automatic vacuum of table "reporting._timescaledb_internal._hyper_8_13_chunk"
2025-02-13 14:52:29.581 UTC [154] ERROR:  function "ts_hypercore_handler" is not supported under the current "timescale" license
2025-02-13 14:52:29.581 UTC [154] HINT:  Upgrade your license to 'timescale' to use this free community feature.
2025-02-13 14:52:29.581 UTC [154] CONTEXT:  automatic vacuum of table "reporting._timescaledb_internal._hyper_8_15_chunk"
2025-02-13 14:52:29.581 UTC [154] ERROR:  function "ts_hypercore_handler" is not supported under the current "timescale" license
2025-02-13 14:52:29.581 UTC [154] HINT:  Upgrade your license to 'timescale' to use this free community feature.
2025-02-13 14:52:29.581 UTC [154] CONTEXT:  automatic vacuum of table "reporting._timescaledb_internal._hyper_8_17_chunk"
2025-02-13 14:52:29.581 UTC [154] ERROR:  function "ts_hypercore_handler" is not supported under the current "timescale" license
2025-02-13 14:52:29.581 UTC [154] HINT:  Upgrade your license to 'timescale' to use this free community feature.
2025-02-13 14:52:29.581 UTC [154] CONTEXT:  automatic vacuum of table "reporting._timescaledb_internal._hyper_8_19_chunk"
2025-02-13 14:52:29.582 UTC [154] ERROR:  function "ts_hypercore_handler" is not supported under the current "timescale" license
2025-02-13 14:52:29.582 UTC [154] HINT:  Upgrade your license to 'timescale' to use this free community feature.
2025-02-13 14:52:29.582 UTC [154] CONTEXT:  automatic vacuum of table "reporting._timescaledb_internal._hyper_8_21_chunk"
2025-02-13 14:52:39.583 UTC [157] ERROR:  function "ts_hypercore_handler" is not supported under the current "timescale" license
2025-02-13 14:52:39.583 UTC [157] HINT:  Upgrade your license to 'timescale' to use this free community feature.
2025-02-13 14:52:39.583 UTC [157] CONTEXT:  automatic vacuum of table "reporting._timescaledb_internal._hyper_8_3_chunk"
2025-02-13 14:52:39.583 UTC [157] ERROR:  function "ts_hypercore_handler" is not supported under the current "timescale" license
2025-02-13 14:52:39.583 UTC [157] HINT:  Upgrade your license to 'timescale' to use this free community feature.
2025-02-13 14:52:39.583 UTC [157] CONTEXT:  automatic vacuum of table "reporting._timescaledb_internal._hyper_8_5_chunk"
2025-02-13 14:52:39.583 UTC [157] ERROR:  function "ts_hypercore_handler" is not supported under the current "timescale" license
2025-02-13 14:52:39.583 UTC [157] HINT:  Upgrade your license to 'timescale' to use this free community feature.
2025-02-13 14:52:39.583 UTC [157] CONTEXT:  automatic vacuum of table "reporting._timescaledb_internal._hyper_8_7_chunk"
2025-02-13 14:52:39.583 UTC [157] ERROR:  function "ts_hypercore_handler" is not supported under the current "timescale" license
2025-02-13 14:52:39.583 UTC [157] HINT:  Upgrade your license to 'timescale' to use this free community feature.
2025-02-13 14:52:39.583 UTC [157] CONTEXT:  automatic vacuum of table "reporting._timescaledb_internal._hyper_8_9_chunk"
2025-02-13 14:52:39.583 UTC [157] ERROR:  function "ts_hypercore_handler" is not supported under the current "timescale" license
2025-02-13 14:52:39.583 UTC [157] HINT:  Upgrade your license to 'timescale' to use this free community feature.
2025-02-13 14:52:39.583 UTC [157] CONTEXT:  automatic vacuum of table "reporting._timescaledb_internal._hyper_8_11_chunk"
2025-02-13 14:52:39.583 UTC [157] ERROR:  function "ts_hypercore_handler" is not supported under the current "timescale" license
2025-02-13 14:52:39.583 UTC [157] HINT:  Upgrade your license to 'timescale' to use this free community feature.
2025-02-13 14:52:39.583 UTC [157] CONTEXT:  automatic vacuum of table "reporting._timescaledb_internal._hyper_8_13_chunk"
2025-02-13 14:52:39.583 UTC [157] ERROR:  function "ts_hypercore_handler" is not supported under the current "timescale" license
2025-02-13 14:52:39.583 UTC [157] HINT:  Upgrade your license to 'timescale' to use this free community feature.
2025-02-13 14:52:39.583 UTC [157] CONTEXT:  automatic vacuum of table "reporting._timescaledb_internal._hyper_8_15_chunk"
2025-02-13 14:52:39.583 UTC [157] ERROR:  function "ts_hypercore_handler" is not supported under the current "timescale" license
2025-02-13 14:52:39.583 UTC [157] HINT:  Upgrade your license to 'timescale' to use this free community feature.
2025-02-13 14:52:39.583 UTC [157] CONTEXT:  automatic vacuum of table "reporting._timescaledb_internal._hyper_8_17_chunk"
2025-02-13 14:52:39.583 UTC [157] ERROR:  function "ts_hypercore_handler" is not supported under the current "timescale" license
2025-02-13 14:52:39.583 UTC [157] HINT:  Upgrade your license to 'timescale' to use this free community feature.
2025-02-13 14:52:39.583 UTC [157] CONTEXT:  automatic vacuum of table "reporting._timescaledb_internal._hyper_8_19_chunk"
2025-02-13 14:52:39.583 UTC [157] ERROR:  function "ts_hypercore_handler" is not supported under the current "timescale" license
2025-02-13 14:52:39.583 UTC [157] HINT:  Upgrade your license to 'timescale' to use this free community feature.
2025-02-13 14:52:39.583 UTC [157] CONTEXT:  automatic vacuum of table "reporting._timescaledb_internal._hyper_8_21_chunk"
2025-02-13 14:52:49.585 UTC [160] ERROR:  function "ts_hypercore_handler" is not supported under the current "timescale" license
2025-02-13 14:52:49.585 UTC [160] HINT:  Upgrade your license to 'timescale' to use this free community feature.
2025-02-13 14:52:49.585 UTC [160] CONTEXT:  automatic vacuum of table "reporting._timescaledb_internal._hyper_8_3_chunk"
2025-02-13 14:52:49.585 UTC [160] ERROR:  function "ts_hypercore_handler" is not supported under the current "timescale" license
2025-02-13 14:52:49.585 UTC [160] HINT:  Upgrade your license to 'timescale' to use this free community feature.
2025-02-13 14:52:49.585 UTC [160] CONTEXT:  automatic vacuum of table "reporting._timescaledb_internal._hyper_8_5_chunk"
2025-02-13 14:52:49.585 UTC [160] ERROR:  function "ts_hypercore_handler" is not supported under the current "timescale" license
2025-02-13 14:52:49.585 UTC [160] HINT:  Upgrade your license to 'timescale' to use this free community feature.
2025-02-13 14:52:49.585 UTC [160] CONTEXT:  automatic vacuum of table "reporting._timescaledb_internal._hyper_8_7_chunk"
2025-02-13 14:52:49.585 UTC [160] ERROR:  function "ts_hypercore_handler" is not supported under the current "timescale" license
2025-02-13 14:52:49.585 UTC [160] HINT:  Upgrade your license to 'timescale' to use this free community feature.
2025-02-13 14:52:49.585 UTC [160] CONTEXT:  automatic vacuum of table "reporting._timescaledb_internal._hyper_8_9_chunk"
2025-02-13 14:52:49.585 UTC [160] ERROR:  function "ts_hypercore_handler" is not supported under the current "timescale" license
2025-02-13 14:52:49.585 UTC [160] HINT:  Upgrade your license to 'timescale' to use this free community feature.
2025-02-13 14:52:49.585 UTC [160] CONTEXT:  automatic vacuum of table "reporting._timescaledb_internal._hyper_8_11_chunk"
2025-02-13 14:52:49.585 UTC [160] ERROR:  function "ts_hypercore_handler" is not supported under the current "timescale" license
2025-02-13 14:52:49.585 UTC [160] HINT:  Upgrade your license to 'timescale' to use this free community feature.
2025-02-13 14:52:49.585 UTC [160] CONTEXT:  automatic vacuum of table "reporting._timescaledb_internal._hyper_8_13_chunk"
2025-02-13 14:52:49.586 UTC [160] ERROR:  function "ts_hypercore_handler" is not supported under the current "timescale" license
2025-02-13 14:52:49.586 UTC [160] HINT:  Upgrade your license to 'timescale' to use this free community feature.
2025-02-13 14:52:49.586 UTC [160] CONTEXT:  automatic vacuum of table "reporting._timescaledb_internal._hyper_8_15_chunk"
2025-02-13 14:52:49.586 UTC [160] ERROR:  function "ts_hypercore_handler" is not supported under the current "timescale" license
2025-02-13 14:52:49.586 UTC [160] HINT:  Upgrade your license to 'timescale' to use this free community feature.
2025-02-13 14:52:49.586 UTC [160] CONTEXT:  automatic vacuum of table "reporting._timescaledb_internal._hyper_8_17_chunk"
2025-02-13 14:52:49.586 UTC [160] ERROR:  function "ts_hypercore_handler" is not supported under the current "timescale" license
2025-02-13 14:52:49.586 UTC [160] HINT:  Upgrade your license to 'timescale' to use this free community feature.
2025-02-13 14:52:49.586 UTC [160] CONTEXT:  automatic vacuum of table "reporting._timescaledb_internal._hyper_8_19_chunk"
2025-02-13 14:52:49.586 UTC [160] ERROR:  function "ts_hypercore_handler" is not supported under the current "timescale" license
2025-02-13 14:52:49.586 UTC [160] HINT:  Upgrade your license to 'timescale' to use this free community feature.
2025-02-13 14:52:49.586 UTC [160] CONTEXT:  automatic vacuum of table "reporting._timescaledb_internal._hyper_8_21_chunk"
2025-02-13 14:52:59.587 UTC [163] ERROR:  function "ts_hypercore_handler" is not supported under the current "timescale" license
2025-02-13 14:52:59.587 UTC [163] HINT:  Upgrade your license to 'timescale' to use this free community feature.
2025-02-13 14:52:59.587 UTC [163] CONTEXT:  automatic vacuum of table "reporting._timescaledb_internal._hyper_8_3_chunk"
2025-02-13 14:52:59.587 UTC [163] ERROR:  function "ts_hypercore_handler" is not supported under the current "timescale" license
2025-02-13 14:52:59.587 UTC [163] HINT:  Upgrade your license to 'timescale' to use this free community feature.
2025-02-13 14:52:59.587 UTC [163] CONTEXT:  automatic vacuum of table "reporting._timescaledb_internal._hyper_8_5_chunk"
2025-02-13 14:52:59.587 UTC [163] ERROR:  function "ts_hypercore_handler" is not supported under the current "timescale" license
2025-02-13 14:52:59.587 UTC [163] HINT:  Upgrade your license to 'timescale' to use this free community feature.
2025-02-13 14:52:59.587 UTC [163] CONTEXT:  automatic vacuum of table "reporting._timescaledb_internal._hyper_8_7_chunk"
2025-02-13 14:52:59.587 UTC [163] ERROR:  function "ts_hypercore_handler" is not supported under the current "timescale" license
2025-02-13 14:52:59.587 UTC [163] HINT:  Upgrade your license to 'timescale' to use this free community feature.
2025-02-13 14:52:59.587 UTC [163] CONTEXT:  automatic vacuum of table "reporting._timescaledb_internal._hyper_8_9_chunk"
2025-02-13 14:52:59.588 UTC [163] ERROR:  function "ts_hypercore_handler" is not supported under the current "timescale" license
2025-02-13 14:52:59.588 UTC [163] HINT:  Upgrade your license to 'timescale' to use this free community feature.
2025-02-13 14:52:59.588 UTC [163] CONTEXT:  automatic vacuum of table "reporting._timescaledb_internal._hyper_8_11_chunk"
2025-02-13 14:52:59.588 UTC [163] ERROR:  function "ts_hypercore_handler" is not supported under the current "timescale" license
2025-02-13 14:52:59.588 UTC [163] HINT:  Upgrade your license to 'timescale' to use this free community feature.
2025-02-13 14:52:59.588 UTC [163] CONTEXT:  automatic vacuum of table "reporting._timescaledb_internal._hyper_8_13_chunk"
2025-02-13 14:52:59.588 UTC [163] ERROR:  function "ts_hypercore_handler" is not supported under the current "timescale" license
2025-02-13 14:52:59.588 UTC [163] HINT:  Upgrade your license to 'timescale' to use this free community feature.
2025-02-13 14:52:59.588 UTC [163] CONTEXT:  automatic vacuum of table "reporting._timescaledb_internal._hyper_8_15_chunk"
2025-02-13 14:52:59.588 UTC [163] ERROR:  function "ts_hypercore_handler" is not supported under the current "timescale" license
2025-02-13 14:52:59.588 UTC [163] HINT:  Upgrade your license to 'timescale' to use this free community feature.
2025-02-13 14:52:59.588 UTC [163] CONTEXT:  automatic vacuum of table "reporting._timescaledb_internal._hyper_8_17_chunk"
2025-02-13 14:52:59.588 UTC [163] ERROR:  function "ts_hypercore_handler" is not supported under the current "timescale" license
2025-02-13 14:52:59.588 UTC [163] HINT:  Upgrade your license to 'timescale' to use this free community feature.
2025-02-13 14:52:59.588 UTC [163] CONTEXT:  automatic vacuum of table "reporting._timescaledb_internal._hyper_8_19_chunk"
2025-02-13 14:52:59.588 UTC [163] ERROR:  function "ts_hypercore_handler" is not supported under the current "timescale" license
2025-02-13 14:52:59.588 UTC [163] HINT:  Upgrade your license to 'timescale' to use this free community feature.
2025-02-13 14:52:59.588 UTC [163] CONTEXT:  automatic vacuum of table "reporting._timescaledb_internal._hyper_8_21_chunk"

Afterwards, I can compress the chunks manually. autovacuum keeps failing, but with a slightly different error message:

SELECT compress_chunk(c) FROM show_chunks('test_signals') c;
2025-02-13 14:54:49.642 UTC [236] ERROR:  function "amvacuumcleanup" is not defined for index "compress_hyper_9_4_chunk_ts_hypercore_proxy_idx"
2025-02-13 14:54:49.642 UTC [236] CONTEXT:  automatic analyze of table "reporting._timescaledb_internal.compress_hyper_9_4_chunk"
2025-02-13 14:54:49.642 UTC [236] ERROR:  function "ts_hypercore_handler" is not supported under the current "timescale" license
2025-02-13 14:54:49.642 UTC [236] HINT:  Upgrade your license to 'timescale' to use this free community feature.
2025-02-13 14:54:49.642 UTC [236] CONTEXT:  automatic vacuum of table "reporting._timescaledb_internal._hyper_8_3_chunk"
2025-02-13 14:54:49.661 UTC [236] ERROR:  function "amvacuumcleanup" is not defined for index "compress_hyper_9_6_chunk_ts_hypercore_proxy_idx"
2025-02-13 14:54:49.661 UTC [236] CONTEXT:  automatic analyze of table "reporting._timescaledb_internal.compress_hyper_9_6_chunk"
2025-02-13 14:54:49.661 UTC [236] ERROR:  function "ts_hypercore_handler" is not supported under the current "timescale" license
2025-02-13 14:54:49.661 UTC [236] HINT:  Upgrade your license to 'timescale' to use this free community feature.
2025-02-13 14:54:49.661 UTC [236] CONTEXT:  automatic vacuum of table "reporting._timescaledb_internal._hyper_8_5_chunk"
2025-02-13 14:54:49.680 UTC [236] ERROR:  function "amvacuumcleanup" is not defined for index "compress_hyper_9_8_chunk_ts_hypercore_proxy_idx"
2025-02-13 14:54:49.680 UTC [236] CONTEXT:  automatic analyze of table "reporting._timescaledb_internal.compress_hyper_9_8_chunk"
2025-02-13 14:54:49.681 UTC [236] ERROR:  function "ts_hypercore_handler" is not supported under the current "timescale" license
2025-02-13 14:54:49.681 UTC [236] HINT:  Upgrade your license to 'timescale' to use this free community feature.
2025-02-13 14:54:49.681 UTC [236] CONTEXT:  automatic vacuum of table "reporting._timescaledb_internal._hyper_8_7_chunk"
2025-02-13 14:54:49.701 UTC [236] ERROR:  function "amvacuumcleanup" is not defined for index "compress_hyper_9_10_chunk_ts_hypercore_proxy_idx"
2025-02-13 14:54:49.701 UTC [236] CONTEXT:  automatic analyze of table "reporting._timescaledb_internal.compress_hyper_9_10_chunk"
2025-02-13 14:54:49.701 UTC [236] ERROR:  function "ts_hypercore_handler" is not supported under the current "timescale" license
2025-02-13 14:54:49.701 UTC [236] HINT:  Upgrade your license to 'timescale' to use this free community feature.
2025-02-13 14:54:49.701 UTC [236] CONTEXT:  automatic vacuum of table "reporting._timescaledb_internal._hyper_8_9_chunk"
2025-02-13 14:54:49.725 UTC [236] ERROR:  function "amvacuumcleanup" is not defined for index "compress_hyper_9_12_chunk_ts_hypercore_proxy_idx"
2025-02-13 14:54:49.725 UTC [236] CONTEXT:  automatic analyze of table "reporting._timescaledb_internal.compress_hyper_9_12_chunk"
2025-02-13 14:54:49.725 UTC [236] ERROR:  function "ts_hypercore_handler" is not supported under the current "timescale" license
2025-02-13 14:54:49.725 UTC [236] HINT:  Upgrade your license to 'timescale' to use this free community feature.
2025-02-13 14:54:49.725 UTC [236] CONTEXT:  automatic vacuum of table "reporting._timescaledb_internal._hyper_8_11_chunk"
2025-02-13 14:54:49.744 UTC [236] ERROR:  function "amvacuumcleanup" is not defined for index "compress_hyper_9_14_chunk_ts_hypercore_proxy_idx"
2025-02-13 14:54:49.744 UTC [236] CONTEXT:  automatic analyze of table "reporting._timescaledb_internal.compress_hyper_9_14_chunk"
2025-02-13 14:54:49.744 UTC [236] ERROR:  function "ts_hypercore_handler" is not supported under the current "timescale" license
2025-02-13 14:54:49.744 UTC [236] HINT:  Upgrade your license to 'timescale' to use this free community feature.
2025-02-13 14:54:49.744 UTC [236] CONTEXT:  automatic vacuum of table "reporting._timescaledb_internal._hyper_8_13_chunk"
2025-02-13 14:54:49.764 UTC [236] ERROR:  function "amvacuumcleanup" is not defined for index "compress_hyper_9_16_chunk_ts_hypercore_proxy_idx"
2025-02-13 14:54:49.764 UTC [236] CONTEXT:  automatic analyze of table "reporting._timescaledb_internal.compress_hyper_9_16_chunk"
2025-02-13 14:54:49.764 UTC [236] ERROR:  function "ts_hypercore_handler" is not supported under the current "timescale" license
2025-02-13 14:54:49.764 UTC [236] HINT:  Upgrade your license to 'timescale' to use this free community feature.
2025-02-13 14:54:49.764 UTC [236] CONTEXT:  automatic vacuum of table "reporting._timescaledb_internal._hyper_8_15_chunk"
2025-02-13 14:54:49.784 UTC [236] ERROR:  function "amvacuumcleanup" is not defined for index "compress_hyper_9_18_chunk_ts_hypercore_proxy_idx"
2025-02-13 14:54:49.784 UTC [236] CONTEXT:  automatic analyze of table "reporting._timescaledb_internal.compress_hyper_9_18_chunk"
2025-02-13 14:54:49.784 UTC [236] ERROR:  function "ts_hypercore_handler" is not supported under the current "timescale" license
2025-02-13 14:54:49.784 UTC [236] HINT:  Upgrade your license to 'timescale' to use this free community feature.
2025-02-13 14:54:49.784 UTC [236] CONTEXT:  automatic vacuum of table "reporting._timescaledb_internal._hyper_8_17_chunk"
2025-02-13 14:54:49.803 UTC [236] ERROR:  function "amvacuumcleanup" is not defined for index "compress_hyper_9_20_chunk_ts_hypercore_proxy_idx"
2025-02-13 14:54:49.803 UTC [236] CONTEXT:  automatic analyze of table "reporting._timescaledb_internal.compress_hyper_9_20_chunk"
2025-02-13 14:54:49.803 UTC [236] ERROR:  function "ts_hypercore_handler" is not supported under the current "timescale" license
2025-02-13 14:54:49.803 UTC [236] HINT:  Upgrade your license to 'timescale' to use this free community feature.
2025-02-13 14:54:49.803 UTC [236] CONTEXT:  automatic vacuum of table "reporting._timescaledb_internal._hyper_8_19_chunk"
2025-02-13 14:54:49.824 UTC [236] ERROR:  function "amvacuumcleanup" is not defined for index "compress_hyper_9_22_chunk_ts_hypercore_proxy_idx"

Compression stats are not working (likely due to no vacuum)

SELECT pg_size_pretty(before_compression_total_bytes), pg_size_pretty(after_compression_total_bytes), pg_size_pretty(hypertable_size('test_signals'))
  FROM hypertable_compression_stats('test_signals');

Image

@jflambert jflambert added the bug label Feb 13, 2025
@jflambert jflambert changed the title [Bug]: frequent autovacuum errors in v2.18.1 autovacuuming compressed hypertables [Bug]: autovacuum errors in v2.18.1 while autovacuuming compressed hypertables Feb 13, 2025
@jflambert jflambert changed the title [Bug]: autovacuum errors in v2.18.1 while autovacuuming compressed hypertables [Bug]: license errors in v2.18.1 while autovacuuming compressed hypertables Feb 13, 2025
@jflambert jflambert changed the title [Bug]: license errors in v2.18.1 while autovacuuming compressed hypertables [Bug]: license errors in v2.18.1 while autovacuuming compressed hypertables with hypercore access method Feb 13, 2025
@jflambert jflambert changed the title [Bug]: license errors in v2.18.1 while autovacuuming compressed hypertables with hypercore access method [Bug]: license errors in v2.18.1 while autovacuuming hypertables with hypercore access method Feb 13, 2025
@jflambert jflambert changed the title [Bug]: license errors in v2.18.1 while autovacuuming hypertables with hypercore access method [Bug]: license errors in v2.18.1 while autovacuuming chunks with hypercore access method Feb 13, 2025
@mkindahl mkindahl self-assigned this Feb 14, 2025
@mkindahl
Copy link
Contributor

@jflambert Thanks for the bug report. I can reproduce the issue here with a different setup by starting a backend and running a simple query with a "default" crossmodule function call.

The issue occurs because the license check is done quite early but the module load (and shared library load) for the process is done quite late (in post_parse_analyze_hook, that is after a query has been executed by the backend). So when the backend (or background worker) starts, it hasn't loaded the TSL library yet, and the cross-module calls go to the Apache version of the function (which generates the error).

Working on a fix, but a workaround is to add the libraries for your version to shared_preload_libraries.

# Add settings for extensions here
shared_preload_libraries = 'timescaledb,timescaledb-2.18.1,timescaledb-tsl-2.18.1'

I used this in my reproduction, and it seems to work.

@mkindahl mkindahl linked a pull request Feb 14, 2025 that will close this issue
@jflambert
Copy link
Author

jflambert commented Feb 14, 2025

@mkindahl

Working on a fix, but a workaround is to add the libraries for your version to shared_preload_libraries.

This works! Hopefully 2.18.2 isn't too far off.

I confirm the errors are gone, and the vacuum (both manual and automatic) seems to work as expected.

However I have trouble with the hypertable_compression_stats function. It doesn't seem to report correct values until I compress the chunks once, decompress them, then recompress them again. Is there a function I can call to force refreshing these compression stats?

EDIT: I logged a separate defect: #7713

@mkindahl
Copy link
Contributor

@mkindahl

Working on a fix, but a workaround is to add the libraries for your version to shared_preload_libraries.

This works! Hopefully 2.18.2 isn't too far off.

I confirm the errors are gone, and the vacuum (both manual and automatic) seems to work as expected.

Thank you for confirming this.

However I have trouble with the hypertable_compression_stats function. It doesn't seem to report correct values until I compress the chunks once, decompress them, then recompress them again. Is there a function I can call to force refreshing these compression stats?

EDIT: I logged a separate defect: #7713

Thank you. It is better to deal with this as a separate issue.

@jflambert
Copy link
Author

hello @mkindahl! I confirm no more vacuum license errors in 2.18.2. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants