Code RoomIndex corruption after unclean shutdown
HardPrep Room Coding #2593

Index corruption after unclean shutdown

On-callDatabases & SQLSenior–Staff~40 min

Postgres 13. A query that filters on `email` started returning *no rows* for users that definitely exist (an index-only lookup), while a seq-scan of the same table finds them. This began after the host had an unclean shutdown last week from a kernel panic; the DB came back up and ran fine until now. `amcheck`'s `bt_index_check` on the `email` btree throws errors. The cluster is a primary with one streaming replica. Triage, restore correctness now, and figure out blast radius.

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.