A schema change hit production at noon. Logs spiked. Queries slowed. The root cause was clear: a new column added to a critical table without the right plan.
Adding a new column in modern databases is not a trivial action. The impact depends on engine, storage, index strategy, and query patterns. On small tables, it may finish instantly. On large, hot tables in production, it can lock writes, rewrite entire files, or trigger replication lag. Each database—PostgreSQL, MySQL, MariaDB—handles schema changes differently. Some can add metadata-only columns fast; others require a full table rewrite.
Before adding a new column, understand the table’s size, indexes, and workload. Run EXPLAIN and inspect access patterns. In PostgreSQL, ALTER TABLE ... ADD COLUMN with a default value will rewrite the table. Without a default, it’s a metadata change—fast and safe. MySQL’s ALTER TABLE may block or use “instant add column” depending on storage settings. For distributed systems, consider cluster-wide replication delays and secondary indexes. Monitor replication health before and after.