Code Room
On-callHard
Question
You store metrics/events in a Postgres table partitioned by day (range partitioning on `event_time`). Ingestion is steady but the current day's partition is the write hot spot — and over the past week, write latency on inserts has been creeping up and now spikes badly near peak, even though older partitions are idle. Index bloat on the active partition's indexes looks high, and `pg_stat_user_tables` shows almost all updates/HOT-update misses concentrated there. Autovacuum mostly leaves the hot partition alone during the day. Triage and mitigate.
What a strong answer looks like
Stop the bleeding first (mitigate), then form hypotheses from real signals. Separate root cause from symptom, communicate status as you go, and close with what prevents a repeat.
Learn the concepts
Loading whiteboard…
Run or narrate your approach, then ask the coach.