Code RoomSequence reached maximum value
HardPrep Room Coding #4567

Sequence reached maximum value

On-callDatabases & SQLReliability & on-callSenior–Staff~35 min

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.

0:00 of about 35 min
Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.