When you add a new column to a table, you are adding both storage and logic. Choose the name, type, and constraints with care. For relational databases, this means defining whether the new column allows nulls, has a default value, or needs indexing. For distributed systems, adding a column must account for replication, serialization formats, and backward compatibility in APIs.
In PostgreSQL, ALTER TABLE ADD COLUMN is fast if you set a default that is NULL. But a non-null default requires rewriting the table, which can lock writes and reads during the operation. MySQL’s performance depends on the storage engine. InnoDB will often require a table copy unless you use ALGORITHM=INPLACE with compatible changes. For columnstores, a new column changes the compression maps and can trigger a full segment rewrite.
A new column in production should be introduced with a staged plan. Start by adding it as nullable with no default. Deploy application code that writes to both the old schema and the new column. Backfill data in batches to avoid locking. After the backfill, change constraints to enforce data integrity. Only when all readers depend on the column should you drop the legacy paths.