Periodic compaction
Iceberg compaction for sinks and engine tables periodically merges small data files and delete files into larger, optimized data files. These operations run in the background at user-defined intervals, ensuring efficient storage management with minimal disruption. To configure Iceberg compaction when creating a sink or table, specify the following parameters in theWITH
clause:
Parameter | Description |
---|---|
enable_compaction | Whether to enable Iceberg compaction (true /false ). |
compaction_interval_sec | Interval (in seconds) between two compaction runs. Defaults to 3600 seconds. |
Manual compaction
In addition to periodic background compaction, you can also trigger compaction manually. By running theVACUUM FULL
command, RisingWave will compact small files and simultaneously expire old snapshots. This gives you finer control over storage cleanup and is useful when you want to immediately reduce storage overhead or reset snapshot history.