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

[Enhancement]: hypertable-based enable and disable functions for policies #6115

Open
JamesGuthrie opened this issue Sep 25, 2023 · 2 comments · May be fixed by #6116
Open

[Enhancement]: hypertable-based enable and disable functions for policies #6115

JamesGuthrie opened this issue Sep 25, 2023 · 2 comments · May be fixed by #6116
Assignees
Labels
enhancement An enhancement to an existing feature for functionality

Comments

@JamesGuthrie
Copy link
Contributor

What type of enhancement is this?

API improvement

What subsystems and features will be improved?

Background worker

What does the enhancement do?

Currently, if I want to disable the compression policy for a hypertable, I have to run the following query:

SELECT public.alter_job(j.id, scheduled => false)
FROM _timescaledb_config.bgw_job j
JOIN _timescaledb_catalog.hypertable h ON h.id = j.hypertable_id
WHERE j.proc_schema IN ('_timescaledb_internal', '_timescaledb_functions')
  AND j.proc_name = 'policy_compression'
  AND j.id >= 1000
  AND format('%I.%I', h.schema_name, h.table_name)::text::regclass = <hypertable name>::text::regclass;

It would be much nicer to do this:

SELECT disable_compression_policy(<hypertable name>);

Implementation challenges

No response

@JamesGuthrie JamesGuthrie added the enhancement An enhancement to an existing feature for functionality label Sep 25, 2023
@JamesGuthrie JamesGuthrie self-assigned this Sep 25, 2023
@RafiaSabih
Copy link
Contributor

RafiaSabih commented Sep 25, 2023 via email

@mkindahl
Copy link
Contributor

mkindahl commented Sep 26, 2023

Thanks @RafiaSabih for pointing to these. I think we need to start graduating functions like this to be non-experimental.

@JamesGuthrie is adding a similar interface to simplify enabling and disabling the jobs associated with the hypertable.

@mkindahl mkindahl changed the title [Enhancement]: {enable,disable}_{compression,retention,continuous_aggregate,reorder}_policy [Enhancement]: enable and disable functions for policies Sep 26, 2023
@mkindahl mkindahl changed the title [Enhancement]: enable and disable functions for policies [Enhancement]: hypertable-based enable and disable functions for policies Sep 26, 2023
@mkindahl mkindahl linked a pull request Sep 27, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement to an existing feature for functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants