engineering
Dispatch
Your database connection works fine under load. Then traffic stops for ten minutes, and the next query gets a broken pipe. The timeout that killed it was set by infrastructure you never configured.
engineering
Dispatch
Logical replication lets you stream row changes between Postgres databases without taking either offline. The setup is deceptively simple. The operational edge cases are not.
engineering
Dispatch
Materialized views pre-compute query results and store them on disk. You pay at refresh time rather than query time. No auto-refresh — that is your job.
engineering
Dispatch
Three strategies exist for isolating database state in tests: truncation, transaction rollback, and separate databases. Transaction rollback is the cheapest option most tests can use — until they can not.
engineering
Dispatch
ALTER TABLE in Postgres acquires ACCESS EXCLUSIVE. That part is documented. What most engineers miss: the waiting migration blocks all queries queued behind it. The 3am maintenance window doesn't fix this.
engineering
Dispatch
Declarative partitioning is built into Postgres. It reduces query planner overhead on large tables—but only for the right queries. Here's when it helps, and what it quietly can't fix.
engineering
Dispatch
Docker's layer cache invalidates on COPY when any file checksum changes — not timestamps. Understanding this precisely changes how you structure Dockerfiles, what goes in .dockerignore, and when multi-stage builds pay off.
engineering
Dispatch
Row-level security lets you enforce tenant isolation inside Postgres itself, before application code sees a row. Here is how to structure policies, handle migrations safely, and avoid the bypass pitfalls that silently break your isolation.
engineering
Dispatch
Environment variables feel private. They're not environment — they're readable from /proc, leakable through docker inspect, inherited by every child process, and often dumped to logs on crash.
engineering
Dispatch
pg_trgm gives you trigram-based fuzzy search inside Postgres. No Elasticsearch, no extra service, no sync pipeline. Just an index and a similarity function.
engineering
Dispatch
Every ORM tutorial shows you how to load a list of records. Almost none show what happens to your database when you access a relationship inside a loop. The answer is a query per iteration.
engineering
Dispatch
postgres_fdw lets you query a remote Postgres database as if its tables were local — no ETL pipeline, no scheduled sync, no data duplication. Here is when it is the right tool and when it is not.