-
Notifications
You must be signed in to change notification settings - Fork 301
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
Alter table options #1084
Comments
After discussing and investigating, decide to use the following syntax: alter table set options(ttl='30d', write_buffer_size='32mb'); The syntax for options is the same as that for creating tables. The other keywords at the |
I guess that we don't allow changing |
Yes, of course. I've done some preliminary work in #2051 . |
@killme2008 Hi! why did you stop this work? I am also interested in this issue, and I also noticed the discussion under #4394. Seems that alter table options and alter database options can be done parallelly. Can I have a try on this issue? |
Feel free to try it. Could you please share your design and steps for implementing this feature? |
here is my rough design:
And where the proto file to generate |
Are you looking for this? What's more, we also need to support altering options in the region engine and update the option of the region. |
Since tables are split and stored in regions, should altering table options result in region options being updated cascadingly? And besides that, do we also need to support altering region options directly? |
Yes, we should also support altering region options. |
@chienguo I'm also very interested in this issue. Are you considering implementing it? If so, I can assign it to you. |
@zyy17 Yes, indeed, could you please assign it to me? |
It's recommended to support altering region options first. We don't store the option in the manifest so we can update the greptimedb/src/mito2/src/worker/handle_alter.rs Lines 115 to 126 in d628079
|
BTW, maybe we don't need the ALTER TABLE table_name SET ( storage_parameter [= value] [, ... ] ) ALTER TABLE table_name UNSET ( storage_parameter [, ... ] ) |
We may support altering other features in the future, so please keep the |
The |
It's a bad practice to distinguish something with |
What type of enhancement is this?
API improvement, Configuration
What does the enhancement do?
For example, modify the table's
TTL
to 30 days:Not all of the table options can be modified. The
regions
option can't be changed right now. Maybe we can manage a white list that contains alterable options.Implementation challenges
How to make the change takes effect dynamically? I am not sure. I think we can implement a observer pattern for it.
The text was updated successfully, but these errors were encountered: