v.23.8Improvement
Added Setting to Ignore Directory Exists Error During Database Replication
Added a settingallow_moving_table_directory_to_trashthat allows to ignoreDirectory for table data already existserror when replicating/recovering aReplicateddatabase. #53425 (Alexander Tokmakov).
Why it matters
This feature addresses the issue where the replication or recovery process fails due to pre-existing table data directories, which causes an error. By enabling this setting, users can allow the system to ignore this conflict, improving robustness and reducing manual intervention during replication or recovery of replicated tables.How to use it
To enable this feature, set theallow_moving_table_directory_to_trash setting to true in the ClickHouse server configuration or session settings. For example:SET allow_moving_table_directory_to_trash = 1This will allow replication and recovery to continue even if a table data directory already exists by moving it to trash rather than raising an error.