v.24.4Improvement

Prevent Table Attachment with Active Replica to Avoid Error #60432

Try to prevent an error #60432 by not allowing a table to be attached if there is an active replica for that replica path. #61876 (Arthur Passos).
Prevents attaching a table if there is an active replica for the same replica path to avoid conflicts.

Why it matters

This feature addresses the problem of attaching a table in ClickHouse when an active replica already exists for the given replica path. It helps prevent errors and potential data inconsistencies by ensuring that users cannot attach a table that conflicts with an existing active replica.

How to use it

Users do not need to enable anything explicitly. When attempting to attach a table, ClickHouse will automatically check for the presence of an active replica on the same replica path and will reject the operation if such a replica exists.