Adding a new column to a database should be simple. When handled poorly, it breaks systems, slows queries, and triggers migrations that take hours. When done well, it’s a quick, safe operation that supports evolving requirements without downtime.
A new column changes the contract between your application and your data layer. Whether you work with PostgreSQL, MySQL, or a columnar store, the act of altering a table has costs. You need to think about locking behavior, null handling, default values, and index implications.
In PostgreSQL, ALTER TABLE … ADD COLUMN runs fast for NULLable fields without defaults. Add a NOT NULL with a default, and the database rewrites the entire table—on large datasets, that can be crippling. MySQL behaves differently depending on the storage engine; InnoDB often rebuilds tables, which means full table copies and heavy I/O.
For production systems, the low-risk path is: