Skip to main content
Status: Proposed · Refs: DEC-B7, DEC-B8 · Pending: pg_partman availability spike (implementation detail, not decision)

Decision

Monthly RANGE partitions on designated append-only tables only (data.md §4 list). Custom SQL migrations own the DDL; a cron job pre-creates N+2 months; DEFAULT partition alerts on any row; retention job exports partition to Storage (NDJSON.gz) then drops it per plan tier (13/25/37+ months). Partition-key predicate mandatory in queries (CI lint, TS-005). Small/regular tables are NOT partitioned.

Consequences

  • Bounded table sizes, cheap retention, pruning keeps hot-path latency flat. − Operational moving parts (creation job, default alerts) — covered by runbook.