Adding a new column sounds simple. In production, it can break everything if done wrong. Schema changes are among the most dangerous operations in any relational database. Every second counts when they run. Every query against the table can collide with them.
A new column is not just a schema adjustment. It is an alteration that changes how the database stores and retrieves data. In PostgreSQL, ALTER TABLE ... ADD COLUMN is fast for nullable fields with no default. Add a default or a NOT NULL constraint and the operation can lock the table and rewrite the whole dataset. In MySQL, ADD COLUMN can block reads and writes depending on the storage engine and configuration.
Experienced teams plan these changes in stages. First, add the new column as nullable without defaults. Second, backfill the data in small batches to avoid locking. Third, add constraints once the column is fully populated. Using transactions or feature flags ensures you can roll forward or back without downtime.
For massive datasets, online schema change tools like pt-online-schema-change or gh-ost help shift the definition without blocking. They create a shadow table with the new column, migrate data in chunks, then atomically swap it in. In cloud-managed environments, check if your provider offers dark-migration features to add a new column without impacting reads.