Overview
Planasonix automatically maintains your managed lakehouse tables to ensure optimal query performance and efficient storage usage. The maintenance scheduler runs daily as a background service, executing the right operations at the right frequency.Operations
Snapshot & Version Expiry (Daily)
Removes old snapshots (Iceberg) and log entries (Delta) that exceed your retention period.- Default retention: 7 days
- Safety: Always keeps at least 2 most recent snapshots/versions
- Iceberg: Removes expired snapshots from metadata JSON, updates snapshot-log
- Delta: Deletes old
.jsonlog files before the 2nd-to-last checkpoint
Orphan File Cleanup (Biweekly)
Detects and safely removes data files not referenced by any metadata.Detect
Lists all files under
data/ and cross-references with Iceberg manifests and Delta log add actions.The two-phase approach prevents accidental deletion of recently written files that may not yet appear in metadata.
Metadata Cleanup (Daily)
Keeps only the current + 3 previous metadata files:- Iceberg:
.metadata.jsonfiles inmetadata/ - Delta:
.checkpoint.parquetfiles in_delta_log/
Parquet File Compaction (Weekly)
Rewrites small Parquet files into larger ones for better query performance.| Setting | Default | Range |
|---|---|---|
| Target Size | 128 MB | 8–1024 MB |
| Min Files | 2 | — |
- Identifies Parquet files smaller than the target size
- Reads all rows and sorts by partition columns
- Writes new files at the target size
- Commits to both Iceberg (new snapshot) and Delta (new log entry)
- Refreshes column statistics (min/max, null counts) for up to 200 columns
Delta Log Checkpointing (Every 10 Versions)
Writes a checkpoint file every 10 Delta log versions to speed up log replay for query engines.Delete Marker Cleanup (Daily, Delta Only)
Removes Deltaremove actions (tombstones) older than min(7 days, retention period).
Configuration
Per-Table Settings
Update maintenance config via API:View Current Config
Manual Trigger
Trigger any maintenance operation on demand:snapshot_expiry— Expire old Iceberg snapshotsversion_expiry— Expire old Delta log versions (alias for Delta format)orphan_cleanup— Detect and stage/delete orphan filescompaction— Compact small Parquet filesmetadata_cleanup— Remove old metadata filesdelta_checkpoint— Write Delta checkpointdelete_marker_cleanup— Clean up Delta delete markersfull_maintenance— Run all operations sequentially
Maintenance History
View past maintenance runs:Scheduler Behavior
- Frequency: Runs every 24 hours
- Concurrency: Up to 4 tables maintained concurrently
- Initial delay: 30 seconds after server startup
- Ordering: Processes tables by
next_maintenance_at(oldest first) - Limits: Processes up to 100 tables per cycle