Adding a new column is not just a schema change. It is a decision that touches performance, code, and production stability. The wrong approach can lock tables, block requests, and cause downtime. The right approach keeps systems live while evolving the data model.
Start by defining the purpose and data type of the new column. Choose the correct type from the start to avoid later migrations. For large tables, avoid default values that force a full rewrite of the table. Instead, add the column as nullable, and backfill data in controlled batches.
Plan the backfill process. Use small transactions to prevent locking. Monitor query performance during the migration, since adding a column can affect indexes and storage. Update relevant indexes only after the data is populated to save time and reduce write amplification.