Adding a new column sounds simple. In practice, the wrong approach can lock tables, slow queries, and trigger downtime. Whether you are working in PostgreSQL, MySQL, or a modern cloud warehouse, the method you choose determines the impact.
In relational databases, a new column changes the schema. On large tables, this operation can rewrite the full dataset. Use ALTER TABLE with caution. In PostgreSQL, adding a nullable column without a default is fast because it updates only the metadata. Adding a column with a default value rewrites every row, which can be slow. In MySQL, even a default can lock the table depending on the engine and version.
Plan the new column with precision. Decide on nullability, data type, and default values before the change. Avoid expensive defaults if you can populate the field in a later batch job. Use online schema change tools like gh-ost or pt-online-schema-change for production workloads. They create a shadow table, sync changes, and swap it in with minimal lock time.