Adding a column is more than a schema change. It touches storage, queries, indexes, migrations, and the edge cases you forgot existed. In SQL, ALTER TABLE ADD COLUMN looks harmless, but in production it can lock tables, spike I/O, or break assumptions buried in your code. No matter the database—PostgreSQL, MySQL, or cloud-native—every new column introduces a ripple you must control.
Start with definition. Choose the right data type, size, and nullability. For large datasets, default values can trigger costly rewrites. In PostgreSQL, adding a nullable column without a default is instant. Adding with a default rewrites every row—this can be millions of writes. If you need defaults, set them after creation with UPDATE in controlled batches.
Plan the migration. Use zero-downtime techniques: create the new column, write to both old and new during transition, backfill in small chunks, then switch reads. Monitor locks and replication lag. Test queries that use the new column before merging—they can hit missing indexes or degrade performance.