Zero-Downtime Postgres Migrations with NOT VALID
Learn how to safely add Foreign Keys and CHECK constraints to massive PostgreSQL tables without lock pileups using NOT VALID and VALIDATE CONSTRAINT.
Topic
A collection of essays to explore, one idea at a time.
Learn how to safely add Foreign Keys and CHECK constraints to massive PostgreSQL tables without lock pileups using NOT VALID and VALIDATE CONSTRAINT.
Learn how PostgreSQL's FOR UPDATE SKIP LOCKED builds transaction-safe background queues without Redis, RabbitMQ, or dual-write headaches.
Stop race conditions and double bookings permanently by leveraging PostgreSQL range types and GiST exclusion constraints at the database level.
Learn how UUIDv7 fixes B-tree index fragmentation, cuts write amplification, and keeps distributed ID generation fast in modern databases.
Learn how the Expand and Contract pattern prevents production outages when renaming or restructuring database columns in continuous deployment environments.
Learn how to build robust HTTP idempotency using atomic state machines, payload hashing, and database-backed locks.
Build high-throughput background queues in PostgreSQL using FOR UPDATE SKIP LOCKED without adding Redis or RabbitMQ infrastructure.
Execution time in PostgreSQL query plans can be deeply misleading. Here is why buffer metrics reveal the true I/O footprint of your queries.
Learn why oversizing PostgreSQL connection pools degrades throughput and how the hardware-aligned sizing formula accelerates production databases.