Adding a new column is common, but doing it in production without slowing systems or blocking writes takes care. Schema changes can lock tables, break dependent code, or trigger costly migrations. The right approach depends on the database engine, the size of the table, and the tolerance for risk.
In PostgreSQL, running ALTER TABLE ADD COLUMN is fast for nullable columns without defaults. It only updates metadata. Problems start when adding a column with a non-null constraint and a default value. That can rewrite every row, causing locks and high I/O. A safer path is to add the column as nullable, backfill in batches, then enforce constraints.
In MySQL, online DDL can help avoid long locks. However, storage engines like InnoDB may still rewrite large tables for certain changes. Tools like gh-ost or pt-online-schema-change perform migration in the background, swapping tables once ready.