Code RoomInserts fail on month boundary
HardPrep Room Coding #2951

Inserts fail on month boundary

On-callDatabases & SQLDistributed systemsSenior–Staff~40 min

00:05 on the 1st of the month: all INSERTs into your time-partitioned `events` table (Postgres, declarative range partitions by month) start failing with "no partition of relation events found for row." Ingestion is down — every write for a timestamp in the new month is rejected, and the upstream queue is backing up fast. Separately, over the past few weeks a few read queries that filter on `event_time` have quietly gotten slower. Context: partitions were always created by hand / a one-off script when the table was set up a year ago; nobody automated future partition creation, and the cron that was supposed to pre-create next month's partition was removed in a 'cleanup' last sprint. Triage and act.

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 40 min
Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.