A new column in a database is simple in theory. In practice, it’s where schema changes meet production traffic. Adding one can trigger locking, replication lag, or downtime if not planned with precision. The right approach depends on your database engine, data volume, and the read/write patterns under load.
First, define the column with the correct data type and default. Avoid defaults that force a table rewrite unless absolutely necessary. In PostgreSQL, adding a nullable column without a default is instant. In MySQL, older versions may still lock the table, so check your engine version and configuration.
Second, control how data is backfilled. Use batch updates with limits to prevent heavy I/O. Monitor CPU, disk, and replication delay between each batch. If you need the column filled immediately, schedule downtime or divert traffic.