Adding a new column to a database sounds simple. It is not. Done wrong, it can lock writes, block reads, and bring production to a halt. Done right, it’s seamless and invisible to end users. Knowing the right approach matters whether you’re evolving a schema in PostgreSQL, MySQL, or a cloud-managed database.
A new column changes both storage and query plans. In PostgreSQL, ALTER TABLE ADD COLUMN is fast for nullable fields with no default. With a default value, it rewrites the table, which can be expensive. Use ALTER TABLE ... ADD COLUMN ... DEFAULT ... with NOT NULL carefully—better yet, add it nullable, backfill in batches, then add constraints.
In MySQL, ALTER TABLE often blocks the table. Modern versions with ALGORITHM=INPLACE or ALGORITHM=INSTANT can add certain columns without a full copy. Test capabilities on your version and engine because defaults, indexes, and generated columns can force a table rebuild.
For distributed databases, each node must see the schema change before new writes depend on it. Schema migrations should be versioned, applied in stages, and observable through metrics. Monitor replication lag and query response times during the change.