v.21.11Improvements

Implement detach_not_byte_identical_parts setting for ReplicatedMergeTree

Implement detach_not_byte_identical_parts setting for ReplicatedMergeTree, that will detach instead of remove not byte-identical parts (after mege/mutate). #28708 (Azat Khuzhin).
Implemented the detach_not_byte_identical_parts setting for ReplicatedMergeTree that detaches parts which are not byte-identical instead of removing them after merge or mutate operations.

Why it matters

This feature addresses the need to preserve disk parts that differ byte-wise after mutation or merge operations. Instead of permanently deleting non-byte-identical parts, they are detached, allowing users to inspect or recover these parts later. This enhances safety and data auditing capabilities in ReplicatedMergeTree tables.

How to use it

To use this feature, set the detach_not_byte_identical_parts setting to 1 in your ClickHouse session or configuration when performing merges or mutations on ReplicatedMergeTree tables. For example:

SET detach_not_byte_identical_parts = 1;


This will cause the server to detach instead of remove parts that are not byte-identical after merges or mutations.