All posts

The new column was live before the deploy finished

Adding a new column should be simple. In practice, it can stall a release or lock a table if done wrong. Most databases handle schema changes differently, and the wrong approach can block traffic or trigger downtime. Speed matters, but so does safety. When you create a new column in Postgres with ALTER TABLE ADD COLUMN, it’s usually instant if there’s no default. Add a default with NOT NULL and Postgres rewrites the whole table. That rewrite grows in cost with table size. MySQL and MariaDB beha

Free White Paper

Column-Level Encryption: The Complete Guide

Architecture patterns, implementation strategies, and security best practices. Delivered to your inbox.

Free. No spam. Unsubscribe anytime.

Adding a new column should be simple. In practice, it can stall a release or lock a table if done wrong. Most databases handle schema changes differently, and the wrong approach can block traffic or trigger downtime. Speed matters, but so does safety.

When you create a new column in Postgres with ALTER TABLE ADD COLUMN, it’s usually instant if there’s no default. Add a default with NOT NULL and Postgres rewrites the whole table. That rewrite grows in cost with table size. MySQL and MariaDB behave differently. Some versions perform a full copy. Others use instant DDL for certain column types. In distributed databases, column changes can ripple across shards and replicas, creating lag.

Before adding a new column in production, check these steps:

Continue reading? Get the full guide.

Column-Level Encryption: Architecture Patterns & Best Practices

Free. No spam. Unsubscribe anytime.
  1. Inspect table size and traffic patterns.
  2. Use nullable columns first, then backfill data asynchronously.
  3. Apply constraints in a separate migration.
  4. Test schema migrations against a clone of production data.
  5. Monitor CPU, I/O, and lock waits during deploy.

For analytics tables, adding a new column is often low risk. For transactional systems, coordinate with operations to reduce lock times. If you need to add multiple new columns, break them into separate changes. This helps avoid long metadata locks and makes rollbacks simpler.

Version control for schema matters. Store migration files in the same repository as your code. Test changes in CI against realistic datasets. Use feature flags to hide incomplete columns until they’re ready for use.

A well-planned new column migration avoids outages and supports fast iteration. Bad planning turns it into the slowest part of your release cycle.

See how hoop.dev can manage schema changes without downtime. Build it, add a new column, and watch it go live in minutes.

Get started

See hoop.dev in action

One gateway for every database, container, and AI agent. Deploy in minutes.

Get a demoMore posts