You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Dropping a hypertable does not drop the associated jobs.
To Reproduce
create extension if not exists timescaledb;
createtablebuggy(inserted timestamptz);
select create_hypertable('buggy', 'inserted');
-- Add a compress policyaltertable buggy set (timescaledb.compress);
select add_compress_chunks_policy('buggy', interval '1 day');
-- Insert some data to have multiple chunks createdINSERT INTO buggy
SELECT
now() - random() * interval '3 months'FROM
generate_series(1,1000);
-- Show the compress jobSELECT
bpcc.*,
schema_name,
table_name
FROM_timescaledb_config.bgw_policy_compress_chunksAS bpcc
LEFT JOIN_timescaledb_catalog.hypertableon (hypertable_id=id)
;
Compress job is still there, but the hypertable is gone
SELECT
bpcc.*,
schema_name,
table_name
FROM
_timescaledb_config.bgw_policy_compress_chunks AS bpcc
LEFT JOIN
_timescaledb_catalog.hypertable on (hypertable_id=id)
;
Previously we could have a dangling policy and job referring
to a now-dropped hypertable.
We also block changing the compression options if a policy exists.
Fixestimescale#1570
Previously we could have a dangling policy and job referring
to a now-dropped hypertable.
We also block changing the compression options if a policy exists.
Fixestimescale#1570
Previously we could have a dangling policy and job referring
to a now-dropped hypertable.
We also block changing the compression options if a policy exists.
Fixes#1570
Relevant system information:
Describe the bug
Dropping a hypertable does not drop the associated jobs.
To Reproduce
Compress job is still there, but the hypertable is gone
Trying to do anything with the now broken job fails
We see a similar error message in the PostgreSQL logfiles
And the job is also not scheduled anymore
Expected behavior
Dropping a hypertable (
CASCADE
) drops the dependent objects;Actual behavior
A compression job (if defined) sticks around, this also violates the
bgw_policy_compress_chunks_hypertable_id_fkey
.This means a restore of this may also cause issues, for example:
The text was updated successfully, but these errors were encountered: