v.25.3Experimental Feature

Allow automatic cleanup merges of entire partitions

Allow automatic cleanup merges of entire partitions after a configurable timeout with a new setting enable_replacing_merge_with_cleanup_for_min_age_to_force_merge. #76440 (Christoph Wurm).
Introduces an automatic cleanup merge feature for entire partitions after a configurable timeout using the new setting enable_replacing_merge_with_cleanup_for_min_age_to_force_merge.

Why it matters

This feature addresses the need to automatically merge and clean up partitions in ReplacingMergeTree tables after they reach a specified minimum age. It helps maintain table efficiency and data compactness without manual intervention.

How to use it

Enable automatic cleanup merges by setting enable_replacing_merge_with_cleanup_for_min_age_to_force_merge to 1 (true) and configure the timeout according to your partition age requirements. This setting triggers background merges that clean up partitions once they pass the defined age threshold.