v.20.1Improvement

Add mutations_sync setting for synchronous ALTER UPDATE/DELETE queries

Add setting mutations_sync which allows to wait ALTER UPDATE/DELETE queries synchronously. #8237 (alesapin)
Add the mutations_sync setting to allow synchronous execution of ALTER UPDATE and ALTER DELETE queries in ClickHouse.

Why it matters

This feature enables users to wait for ALTER UPDATE and ALTER DELETE mutations to complete before proceeding, ensuring that data modifications are fully applied. This solves the problem of asynchronous mutations which may delay visibility of changes, providing better consistency and control for query workflows.

How to use it

To use this feature, set the mutations_sync setting to true for your session or query. For example:

SET mutations_sync = 1;
ALTER TABLE table_name UPDATE column = value WHERE condition;

This will make the ALTER UPDATE or ALTER DELETE query wait until the mutation is fully applied.