Adding a new column to a database table seems simple. In practice, it can disrupt production systems, trigger costly downtime, and break dependent services. Whether you work with PostgreSQL, MySQL, or distributed SQL engines, you need to understand the operational impact before making the change.
A new column changes the shape of every row. On large datasets, this means rewriting data files or updating indexes. In PostgreSQL, ALTER TABLE ADD COLUMN is usually fast if you set a default of NULL. If you add a default value that is not NULL, the database may rewrite the entire table, locking writes and reads for the duration.
In MySQL with InnoDB, adding a column used to involve a full table copy. Later versions support instant add column operations in some cases, but not for all data types or positions. Always check the execution plan and the engine’s release notes before deploying.
Distributed databases like CockroachDB or Yugabyte handle schema changes online, but they still have propagation delays. You must ensure that application code can handle partial rollout when some nodes see the new column and others don’t.