v.23.12New Feature

Added ALTER TABLE command for applying deleted masks in ClickHouse

Added a new mutation command ALTER TABLE <table> APPLY DELETED MASK, which allows to enforce applying of mask written by lightweight delete and to remove rows marked as deleted from disk. #57433 (Anton Popov).
New mutation command ALTER TABLE <table> APPLY DELETED MASK for enforcing lightweight delete masks and removing deleted rows from disk.

Why it matters

This feature enables users to physically remove rows that have been marked as deleted by lightweight delete operations. It solves the problem of how to enforce deletion masks and reclaim disk space by actually deleting the masked rows from the storage, improving data consistency and storage efficiency.

How to use it

Use the mutation command by executing:

ALTER TABLE <table> APPLY DELETED MASK


This will apply the deletion mask and remove the deleted rows permanently from disk.