Code Room
On-callHardoc-g239
Subject Database incidentsLevel Senior–Staff~35 minCommon in Databases & SQL · Reliability & on-call interviewsIndustries Technology, Software development

Question

Postgres. At 09:14 every INSERT into the `events` table began failing with `nextval: reached maximum value of sequence "events_id_seq" (2147483647)`. The table's `id` is the primary key. Writes to this one table are fully down; reads are fine. The table has billions of historical rows (many since deleted). There was no deploy. Triage, restore writes with minimal downtime, and prevent recurrence on other tables.

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.

Diagram & narrate the incident
Loading whiteboard…
Run or narrate your approach, then ask the coach.