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

[jdbc] Better support for Timescale features #12051

Open
lujop opened this issue Jan 15, 2022 · 1 comment
Open

[jdbc] Better support for Timescale features #12051

lujop opened this issue Jan 15, 2022 · 1 comment
Labels
enhancement An enhancement or new feature for an existing add-on

Comments

@lujop
Copy link
Contributor

lujop commented Jan 15, 2022

Timescale support was added in #11091 but only for creating hypertables.
At least there are two other features of Timescale that fit extraordinarily well with OpenHab:

  • data compression policies
  • data retention policies

Both are defined per table using a select in a similar way to how the hypertable is created.
As there can be also other similar options and new possibilities in new timescale versions I think that will be useful to have a generic option to add extra DDL statements in native format when an Item table is created.

That way a user would be able to configure for example something like:

post_create_item_table_statements:

SELECT add_retention_policy('#tableName#', INTERVAL '24 hours');
SELECT add_compression_policy('#tableName#', INTERVAL '7 days');

If this approach is accepted I will try to contribute with a PR.

@lujop lujop added the enhancement An enhancement or new feature for an existing add-on label Jan 15, 2022
@openhab-bot
Copy link
Collaborator

This issue has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/mysql-data-reduction/141319/2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement or new feature for an existing add-on
Projects
None yet
Development

No branches or pull requests

2 participants