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
Allow configuring storage as SETTINGS disk='<disk_name>'
(instead of storage_policy
) and explicit disk creation SETTINGS disk=disk(<disk_configuration>)
#41976
Conversation
9855545
to
51d4181
Compare
3f3d745
to
a08267a
Compare
a08267a
to
d538b5f
Compare
bc877fe
to
7fbc77e
Compare
9cfe514
to
ef0a3df
Compare
…rage-policy' into allow-single-disk-instead-of-storage-policy
a059db9
to
301c7c9
Compare
@@ -109,7 +114,15 @@ bool ParserSetQuery::parseNameValuePair(SettingChange & change, IParser::Pos & p | |||
value = std::make_shared<ASTLiteral>(Field(static_cast<UInt64>(1))); | |||
else if (ParserKeyword("FALSE").ignore(pos, expected)) | |||
value = std::make_shared<ASTLiteral>(Field(static_cast<UInt64>(0))); | |||
else if (!value_p.parse(pos, value, expected)) | |||
/// for SETTINGS disk=disk(type='s3', path='', ...) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That can be dangerous. I mean what if somebody will write SETTINGS disk=disk(type='local', path='<some_system_path>')
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it should accept only disk name, and path
can be extracted from ATTACH TABLE FROM <path>
(now it looks at user_files
) ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That can be dangerous. I mean what if somebody will write SETTINGS disk=disk(type='local', path='<some_system_path>')
and this is allowed, there are even tests for that, BUT it is allowed only if there is an explicit setting in server config that tells which base directory can be used for such out-of-config disks and in code all non-remote disks must lay in this directory.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it should accept only disk name, and path can be extracted from ATTACH TABLE FROM (now it looks at user_files) ?
hm, this does not seem convenient for me
…rage-policy' into allow-single-disk-instead-of-storage-policy
…-instead-of-storage-policy
7f9ae9c
to
f0dab99
Compare
f0dab99
to
d876a39
Compare
a04a938
to
2e69dc6
Compare
2e69dc6
to
6cea67d
Compare
f79c398
to
8458c78
Compare
Does it support named collections in disk definition (it make sense for s3)? |
I do not see much sense for this, you can use |
It's more for:
Yeah, it would be nicely. |
ok, I see, could you please create an issue for this? |
I thought about this too, but then decided that this could be a security breach, since you can override |
But, arent it's already possible via feature like that:
When we define creds per endpoint prefix. |
You mean if the I was worrying more about when |
I see, But it the same problem which will happen for PostgreSQL/MySQL creds already? If you can override table for example |
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Allow configuring storage as
SETTINGS disk='<disk_name>'
(instead ofstorage_policy
) and with explicit disk creationSETTINGS disk=disk(type=s3, ...)