GreptimeTeam / greptimedb

An open-source, cloud-native, distributed time-series database with PromQL/SQL/Python supported. Available on GreptimeCloud.
https://greptime.com/
Apache License 2.0
3.96k stars 281 forks source link

[Tracking issue] Support database level options and inheritance #3708

Open v0y4g3r opened 2 months ago

v0y4g3r commented 2 months ago

What problem does the new feature solve?

This feature request is a generalization of #1496 which calls for database level TTL.

Tables inside a same database may share some common configurations, like TTL, compaction strategy, etc. It will be convinient if we can set database options when creating databases and allow all tables in that database inherit these options.

What does the feature do?

This feature involves 3 subtasks:

Implementation challenges

No response

killme2008 commented 2 weeks ago

@v0y4g3r @evenyag Hi, team, I think this task must be prioritized because the database TTL really matters in users' scenarios, especially for auto-generated tables.

killme2008 commented 1 week ago

@v0y4g3r @evenyag Hi, team, I think this task must be prioritized because the database TTL really matters in users' scenarios, especially for auto-generated tables.

I found that database ttl already supported currently:

https://github.com/GreptimeTeam/greptimedb/blob/cc2f7efb983fe057b4efa0cf625d7658a7b5e774/src/operator/src/statement/ddl.rs#L1168

It merge the table options and database options here 👍

v0y4g3r commented 1 week ago

@v0y4g3r @evenyag Hi, team, I think this task must be prioritized because the database TTL really matters in users' scenarios, especially for auto-generated tables.

I found that database ttl already supported currently:

https://github.com/GreptimeTeam/greptimedb/blob/cc2f7efb983fe057b4efa0cf625d7658a7b5e774/src/operator/src/statement/ddl.rs#L1168

It merge the table options and database options here 👍

Yes we now support creating databases with options but still lacks altering database options.