v.20.7New Feature
Add allow_non_metadata_alters setting to restrict ALTER queries that modify disk data
Add settingallow_non_metadata_alterswhich restricts to executeALTERqueries which modify data on disk. Disabled be default. Closes #11547. #12635 (alesapin).
Why it matters
This feature restrictsALTER queries which affect data on disk, enhancing safety by preventing potentially unsafe or unintended data modifications through ALTER statements. It helps users avoid accidental changes to stored data structures or content, improving stability and data integrity.How to use it
Users can enable or disable this restriction by settingallow_non_metadata_alters to true or false. By default, it is disabled (set to false), blocking ALTER queries that modify data on disk. To allow such queries, set the setting to true either in the server configuration or per session.