Runbooks
Partition split
SEV2 runbook for a Postgres partition approaching size limits.
Last updated
Partition split (SEV2)
Triggered by: a hot table's current partition exceeds size threshold
(typically 50M rows / 100GB). apps/api/lib/partition-splitter from
P0.H9 normally handles this automatically; manual intervention only
on degenerate cases.
Diagnose
matter ops partition-status --table <name>Identify:
- Current partition size + row count.
- Next-partition readiness (precreated?).
- Recent write rate per partition.
Auto-split path
Normally the rolling-create cron handles partitioning:
matter ops partition-create-next --table <name>This is the standard daily path.
Manual intervention
When auto-split degenerates:
- Plan target boundary (typically monthly: month-of-creation).
- Pre-create partitions for the next 12 months if catching up.
- Confirm EXPLAIN plans still prune correctly post-split:
matter ops verify-query-plan --table <name>
Validate
matter ops verify-partitions --table <name>Expected: every partition under threshold, EXPLAIN plans prune to single partition for time-bounded queries.
Post-recovery
- Adjust auto-split threshold if the default tripped late.
- Verify hot-row table list is current.