v.25.4New Feature

Support ALTER TABLE

Support ALTER TABLE ... ATTACH|DETACH|MOVE|REPLACE PARTITION for the plain_rewritable disk. #77406 (Julia Kartseva).
Support for ALTER TABLE ... ATTACH, DETACH, MOVE, and REPLACE PARTITION operations on the plain_rewritable disk.

Why it matters

This feature enables users to manage partitions more flexibly on tables stored using the plain_rewritable disk by allowing standard partition-level operations such as attaching, detaching, moving, and replacing partitions. It addresses the previous limitation where these ALTER TABLE commands were not supported for this disk type, improving data management capabilities and operational convenience.

How to use it

Users can apply partition operations on tables with the plain_rewritable disk by issuing the standard ALTER TABLE commands: ATTACH PARTITION, DETACH PARTITION, MOVE PARTITION, and REPLACE PARTITION. For example:
ALTER TABLE table_name ATTACH PARTITION 'partition_id' FROM 'source';
ALTER TABLE table_name DETACH PARTITION 'partition_id';
ALTER TABLE table_name MOVE PARTITION 'partition_id' TO 'target_disk';
ALTER TABLE table_name REPLACE PARTITION 'partition_id' FROM 'source_table';