"Cannot online add a new column"
This is false.
https://dev.mysql.com/doc/refman/5.6/en/innodb-create-index-...
Very weird.
Very weird.
Add column
In-Place?: *Yes*
Rebuilds Table?: *Yes*
Permits Concurrent DML?: *Yes* (Concurrent DML is not permitted when adding an auto-increment column.)
Only Modifies Metadata?: *No*
Data is reorganized substantially, making it an expensive operation.
In practice, the last no is a serious problem.Quoting from the article:
real problem for big tables
as adding a few columns to our biggest tables started to take 2+ hours
or sometimes was completely unpredictable and exceeded our announced downtime windows.
Apparently, adding a column was even a problem during a maintenance window because the runtime was even longer than they expected.Compared to PostgreSQL:
As long as the new column is NULL and does not have a default value,
it’s in practice a no-op to add it. No matter if your table size is 100MB or 100GB