v.25.6Improvement

Add IF EXISTS modifier to SYSTEM SYNC

Add IF EXISTS modifier to SYSTEM SYNC REPLICA. #80810 (Raúl Marín).
Added the IF EXISTS modifier to the SYSTEM SYNC REPLICA command in ClickHouse.

Why it matters

This feature allows users to run the SYSTEM SYNC REPLICA command safely without raising an error if the specified replica does not exist, improving script robustness and error handling during replica synchronization.

How to use it

Use the IF EXISTS modifier in the command syntax as follows:

SYSTEM SYNC REPLICA <replica_name> ON CLUSTER <cluster_name> IF EXISTS

This ensures the command executes only if the replica exists, otherwise it simply skips synchronization without an error.