Blog

Migration safety insights for Postgres teams.

The lock_timeout Death Spiral: Why Every Postgres Migration Needs a Timeout

Your migration grabs an ACCESS EXCLUSIVE lock. It queues behind a long-running query. Every new connection piles up behind it. In 30 seconds, your entire database is frozen. Here's the fix.

pgfence 0.4.1: Trust Contract Hardening, 22 New Tests

We audited every rule, extractor, and reporter in pgfence and fixed 18 silent failure paths, 6 bugs, and 11 stale comments. Here is what we found and what we fixed.

pgfence 0.4: Trace Mode, Verified Lock Analysis Against Real Postgres

pgfence can now execute migrations against a real Postgres instance and verify lock predictions against observed behavior. It spins up a disposable Docker container and traces statements one by one.

False Negatives: The Silent Killer of Migration Safety Tools

Your migration linter says everything is safe. It's wrong. Here's why false negatives are more dangerous than false positives, and what we do about it.

pgfence 0.3: VS Code Extension, LSP Server, and 5 New Rules

pgfence now runs inside your editor. Real-time diagnostics, quick fixes for supported safe rewrites, and hover info for SQL migrations. Plus new rules for char fields, serial columns, DROP DATABASE, and domain constraints.

The Expand/Contract Pattern: Five Zero-Downtime Migration Recipes

Step-by-step SQL sequences for the five most common dangerous migrations. No downtime, no blocked queries, no surprises.

PGLT + pgfence: Catch SQL Errors and Lock Dangers in One CI Pipeline

Postgres Language Server validates SQL correctness. pgfence adds lock and migration-safety analysis. Here's how to run both in CI for broader migration coverage.

TypeORM Migrations Are Dangerous (Here's How to Check)

TypeORM's migration generator doesn't understand Postgres lock modes. Here's what that means for your production database and how to catch problems before they ship.

The Postgres Lock Mode Cheat Sheet Nobody Gave You

A plain-English reference for the eight PostgreSQL lock modes, which DDL statements trigger them, and what they actually block in production.

How one ADD COLUMN migration took down our 12M-row table

A war story about a volatile-default footgun, why ORMs hide it from you, and the staged rollout pattern that prevents it.