When a database evolves, adding a new column is one of the most common operations. It sounds simple. In production systems, it is not. The wrong approach can block writes, trigger downtime, or cause replication lag to spike. The right approach keeps the system live while the schema shifts under load.
A new column changes the shape of your data. In relational databases like PostgreSQL or MySQL, the action starts with an ALTER TABLE command. On small tables, this is instant. On tables with millions of rows, execution time can be dangerous. Each vendor implements it differently, and some storage engines rewrite the whole table for the change. This is why online schema change tools, write-ahead migration patterns, and default value planning matter.
Adding a new column with a default value can lock the table. Better to add it as nullable, backfill in batches, then add constraints. In high-traffic environments, every migration must be zero-downtime. Use transaction-safe migrations. Coordinate the change with application code so that old and new schemas can run in parallel until deployment is complete.