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.
TTL distributed locks cannot prevent race conditions during process pauses. Learn why monotonic fencing tokens are necessary to guarantee data integrity.
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.
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.
Before deploying Redis or RabbitMQ for background tasks, learn how PostgreSQL's FOR UPDATE SKIP LOCKED provides transactional job queues with zero extra infra.
Learn why oversized database connection pools ruin performance, and how to calculate the optimal pool size for high-throughput microservices.