A new column sounds simple, but the impact can be brutal if handled poorly. Schema changes on large datasets can lock tables, block writes, and degrade performance. The right process preserves uptime, data integrity, and deployment velocity.
When adding a new column, first choose the correct type and constraints. Avoid defaults that trigger table rewrites. For nullable columns, add them without a default to make the change instant in most databases. For non-null columns with defaults, backfill data in batches to prevent long locks.
In PostgreSQL, ALTER TABLE ... ADD COLUMN without a default executes quickly for nullable columns. In MySQL, the behavior depends on the storage engine and version—check if an instant ADD COLUMN is supported. Where instant operations are not available, use online schema change tools like gh-ost or pt-online-schema-change.