Adding a new column in a production database is routine until it isn’t. Schema changes can lock tables, spike query times, and stall workflows. When workloads can’t stop, you need a plan that avoids downtime and preserves data integrity.
The safest process starts with understanding the database engine. In PostgreSQL, ALTER TABLE ADD COLUMN is fast if the new column has no default and is nullable. The command updates the catalog, not every row. But with large defaults or NOT NULL constraints, the change rewrites the table and can block writes. In MySQL, an ADD COLUMN may trigger a full table copy, depending on the storage engine and exact column definition.
For high-traffic systems, break the change into steps. First, add the new column as nullable without a default. This is nearly instant on most platforms. Then backfill the column in batches using controlled update jobs that respect replication lag. After the data is in place, add constraints and defaults in a locked maintenance window or using an online schema change tool.