Databases
Bug Report
Deploy migration rewrote a Postgres table and blocked all writes
A routine deploy changed an integer column to bigint. Postgres rewrote the 90-million-row table under an ACCESS EXCLUSIVE lock and every write to orders queued for 14 minutes. We rebuilt the change as expand and contract with a trigger, batched backfill, lock_timeout and a separate migration step.