v.24.2New Feature

Added ALTER TABLE command to remove ZooKeeper nodes for empty partitions

Added query ALTER TABLE table FORGET PARTITION partition that removes ZooKeeper nodes, related to an empty partition. #59507 (Sergei Trifonov). This is an expert-level feature.
Introduced the ALTER TABLE table FORGET PARTITION partition query to remove ZooKeeper nodes associated with empty partitions.

Why it matters

This feature addresses the need to clean up ZooKeeper metadata for partitions that are empty, preventing potential inconsistencies or leftover metadata in distributed ClickHouse tables. It is intended for expert users managing partition metadata.

How to use it

Run the query using the syntax:

ALTER TABLE <table_name> FORGET PARTITION <partition_value>


This command will delete the ZooKeeper nodes related to the specified empty partition.