The database waited, but the new column was not there yet. You knew it should be. The schema needed to change, and production would not wait. Adding a new column sounds simple. In practice, it can break migrations, lock tables, and slow queries if you get it wrong.
A new column is more than a definition in SQL. On large datasets, it is a structural operation with real performance cost. An ALTER TABLE command can rewrite entire segments of data. That means downtime if you do not plan. Choose the right approach before you run the migration.
In PostgreSQL, adding a nullable column without a default is fast. The database only updates metadata. In MySQL, certain storage engines still require a full table rebuild. In distributed systems, the operation may lag behind in replicas. The problem grows if your column needs an index or a non-null default value.
One safe path is to add the new column as nullable, backfill it in batches, then lock it down. Another is to use an online schema change tool like pt-online-schema-change or gh-ost. These allow long-running migrations without blocking reads and writes. PostgreSQL’s ADD COLUMN plus concurrent index creation can achieve the same.