v.24.10Improvement

Check for Storage Policy and Disk Compatibility in ClickHouse

A check if table has both storage_policy and disk set. A check if a new storage policy is compatible with an old one when using disk setting is added. #70839 (Kirill).
Added validation checks for tables using both storage_policy and disk settings, ensuring compatibility of new storage policies with existing ones when the disk setting is applied.

Why it matters

This feature addresses the potential conflicts and misconfigurations arising when a table has both storage_policy and disk options set simultaneously. It ensures that any new storage policy introduced remains compatible with the old policy in contexts where the disk setting is used, preventing errors and maintaining data integrity.

How to use it

Users should define storage policies carefully and rely on the built-in checks that automatically validate compatibility when modifying table configurations involving storage_policy and disk. No additional configuration is required to enable this validation.