Adding a new column should be fast, safe, and predictable. Yet, in high-traffic systems, schema changes can stall queries, lock tables, and disrupt uptime. The right approach depends on the database engine, the volume of data, and how close the system runs to its performance limits.
In PostgreSQL, ALTER TABLE ADD COLUMN is straightforward if no constraints or heavy indexes come with it. The operation is near-instant for nullable columns without defaults. But adding a non-null with a default rewrites the table, blocking writes and consuming I/O. The fix is to create the column as nullable, backfill in batches, then apply constraints in a later transaction.
MySQL behaves differently. Certain ADD COLUMN actions in InnoDB block reads and writes unless you build with ALGORITHM=INPLACE where possible. Even then, large datasets can stress replica lag. Using pt-online-schema-change or gh-ost helps perform migrations without downtime by copying rows to a ghost table and swapping it in.