Adding a new column is a fundamental schema change, but it can break production if done carelessly. The process affects storage, indexing, queries, and application logic. Whether your system runs on PostgreSQL, MySQL, or any distributed SQL database, precision matters.
Start by defining the column type with intention. Choose the smallest sufficient data type to avoid unnecessary storage bloat and cache misses. If the new column must allow null values, set that from the start to prevent costly ALTER TABLE operations on large datasets. For default values, assign constants rather than computed defaults when possible for faster migrations.
Understand your engine's locking behavior. In PostgreSQL, adding a nullable column without a default is fast. Adding a column with a non-null default rewrites the table, which can lock writes. MySQL can add certain types of columns instantly if using the right storage engine and version. For high-volume systems, run the change during a maintenance window or use an online schema migration tool such as gh-ost or pt-online-schema-change.