Adding a new column sounds simple, but the wrong move can lock queries, spike load, or break production. The safest path starts with knowing exactly how your database handles schema changes.
In PostgreSQL, ALTER TABLE ADD COLUMN is fast for empty columns with default NULL. Add a default value and NOT NULL, and you trigger a full table rewrite. MySQL behaves differently—some operations are instant with ALGORITHM=INPLACE, but change a column’s type or default in older versions and expect downtime.
For high-traffic systems, online schema changes are the gold standard. Tools like gh-ost and pg_osc create a shadow table, apply the new column, copy data in chunks, and swap without locking large tables. This prevents query pile‑ups during migration.