v.24.4Improvement

MOVE PARTITION TO TABLE Query Delays or Throws TOO_MANY_PARTS Exception to Manage Part Count Limits

MOVE PARTITION TO TABLE query can be delayed or can throw TOO_MANY_PARTS exception to avoid exceeding limits on the part count. The same settings and limits are applied as for theINSERT query (see max_parts_in_total, parts_to_delay_insert, parts_to_throw_insert, inactive_parts_to_throw_insert, inactive_parts_to_delay_insert, max_avg_part_size_for_too_many_parts, min_delay_to_insert_ms and max_delay_to_insert settings). #62420 (Sergei Trifonov).
The MOVE PARTITION TO TABLE query now respects part count limits and can be delayed or throw a TOO_MANY_PARTS exception to prevent exceeding these limits.

Why it matters

This feature helps maintain system stability and performance by applying the same part count constraints and delay mechanisms used in INSERT queries to MOVE PARTITION TO TABLE operations. It prevents overwhelming the system with too many parts, reducing the risk of resource exhaustion and operational issues.

How to use it

Users can control the behavior of MOVE PARTITION TO TABLE with existing settings that govern part counts and delays, such as max_parts_in_total, parts_to_delay_insert, parts_to_throw_insert, inactive_parts_to_throw_insert, inactive_parts_to_delay_insert, max_avg_part_size_for_too_many_parts, min_delay_to_insert_ms, and max_delay_to_insert. These settings automatically apply to MOVE PARTITION TO TABLE queries without additional configuration.