The new column arrived without warning. It split the table clean, shifting the schema into something sharper, faster, and more alive. Adding a new column is simple in theory, but one mistake can lock your database, stall your deploys, and trigger cascading failures. Precision matters.
In relational databases, a new column changes both structure and behavior. A single ALTER TABLE ADD COLUMN can be safe for small datasets but dangerous at scale. Large tables require careful planning to avoid full table rewrites and long locks. You must account for default values, NULL handling, and indexing strategies before running the command.
When adding a new column to PostgreSQL, using ADD COLUMN without a default value is instant because it updates only the schema. Adding a column with a default non-NULL value rewrites the entire table, which can be slow and block writes. Instead, create the column nullable, backfill data in controlled batches, then set the default and constraints. MySQL, MariaDB, and other engines have their own performance profiles, and version differences can change execution time significantly.