Adding a new column is one of the most common database operations. It should be simple. In practice, it often carries risk. Done in production, it can lock tables, block writes, and push latency through the roof. The method you choose matters as much as the new data you store.
In relational databases like PostgreSQL, ALTER TABLE ADD COLUMN is the standard. It defines the column and, if a default value is set, rewrites the whole table. That rewrite is the danger. For large datasets, it can mean minutes or hours of downtime under load. Without a default, the operation is faster—PostgreSQL will just track the metadata until values are inserted manually.
Some teams avoid blocking by creating the new column without defaults, then backfilling in small batches. This reduces write locks and lets the database breathe. Tools like pg_copy or application-level scripts can run batch updates without impacting live traffic.
In MySQL, adding a new column can be more complex depending on the storage engine and server version. Before MySQL 8.0, schema changes would often require a table rebuild. Online DDL operations now make it possible to add columns with minimal blocking, but monitoring during the migration is still critical.