greptimedb icon indicating copy to clipboard operation
greptimedb copied to clipboard

[Tracking issue] Support database level options and inheritance

Open v0y4g3r opened this issue 10 months ago • 3 comments

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:

  • [x] Allow creating databases with options. Currently CREATE DATABASE does not accept any option #3710
  • [x] Read database options when table options is not present during table creation
  • [ ] Allow altering table/database options
  • [ ] Fuzz tests

Implementation challenges

No response

v0y4g3r avatar Apr 15 '24 11:04 v0y4g3r

@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 avatar Jun 18 '24 16:06 killme2008

@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 👍

killme2008 avatar Jun 19 '24 17:06 killme2008

@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.

v0y4g3r avatar Jun 25 '24 06:06 v0y4g3r