Adding a new column is one of the most common schema changes in any production database. It sounds simple, but the wrong approach risks downtime, data corruption, or blocked queries. The right method depends on scale, database engine, and migration strategy.
In PostgreSQL, a new column with a default value of NULL is fast because it updates system metadata without rewriting the table. Adding a default with a constant value, however, forces a full table rewrite in older versions, locking writes. Newer versions optimize this by storing metadata-only defaults until a row is updated.
In MySQL, adding a column can still lock the table unless you use ALGORITHM=INPLACE or ALGORITHM=INSTANT where supported. INSTANT is ideal for adding nullable or defaulted columns without modifying existing rows. Always check engine compatibility before running migrations in production.