Adding a new column is one of the most common schema migrations in any production system. It looks simple. It is not. A poorly planned ALTER TABLE can lock writes, spike CPU, or take down a core service. The cost grows with table size, index complexity, and concurrent traffic.
A new column should start as a clear definition: name, type, nullability, and default value. Defaults that require backfilling can block operations. Nullable columns often deploy faster but may shift complexity into the application layer. Choosing the right data type reduces the need for later transformations.
In most relational databases, adding a column without a default is instant for small tables but risky for large ones. PostgreSQL, MySQL, and MariaDB have different execution paths. PostgreSQL stores metadata for a default and applies the value at read time. MySQL may rebuild the table based on engine and version. Each behavior matters when uptime is critical.
Plan rollout in stages. First, deploy the migration without altering existing data. Then backfill in small batches, throttled to protect CPU and I/O. Use monitoring to detect replication lag, table locks, or concurrency bottlenecks. If the column needs an index, add it only after data backfill completes.