Here is how a migration that does no work at all takes a table offline. ALTER TABLE orders ADD COLUMN note text; A nullable column, no default. This is a catalog change; on its own it holds its lock for a few milliseconds. It does not matter how big the table is. What matters is who else is holding a lock on the table when it asks for its own, and that is something the migration author can not see and did not think about, because the statement is so obviously harmless. ...