Discussion about this post

User's avatar
Abhishek Pan's avatar

Worth a pre-flight check too: if pg_stat_activity shows any transaction with xact_start older than a minute, abort before the ALTER ever joins the queue. Forgotten idle-in-transaction psql sessions are the classic blocker, and idle_in_transaction_session_timeout kills them off on its own.

Ready for more?