Adding a new column seems simple. It can be. But in production systems with high traffic, the wrong approach can lock tables, degrade performance, and block writes. Speed matters. Safety matters more.
A new column alters the schema. In relational databases like PostgreSQL or MySQL, this often triggers a table rewrite, especially if the column has a non-null default. On massive tables, this can stall queries for minutes or hours. That’s why zero-downtime migration techniques exist. First, create the column with a nullable default. Then populate values in small batches, using application code or background jobs. Finally, enforce constraints once the data is ready.
NoSQL systems handle schema changes differently. In MongoDB, you can insert documents with new fields without altering existing records. Still, large-scale backfills require controlled rollouts. Monitor metrics. Fail fast if jobs impact latency.