PGH Web Blog
Browse by topic →Articles on web development.
Posts
Autovacuum Is Not Magic: What It Does, What It Misses, and When to Help It
Dead tuples are a PostgreSQL fact of life. Autovacuum handles them, until it doesn't. What to check in pg_stat_user_tables, how to tune the thresholds, and when to run VACUUM ANALYZE manually.
The Circuit Breaker: The Pattern You Need Before You Need It
Without a circuit breaker, when a downstream service fails slowly, your service fails slowly too. The pattern is easy to implement. Nobody adds it until after the first incident.
Error Handling in TypeScript That Is Actually Usable
The catch (e: any) is a code smell that tells you the team gave up on typed errors. The alternatives, their tradeoffs, and the patterns that make error handling composable.
Idempotency: The Property Your Retries Depend On
An operation is idempotent if doing it twice produces the same result as doing it once. Most retries assume this. Most operations don't guarantee it by default.
JSONB in PostgreSQL: When It's the Right Answer and When It Isn't
JSONB solves a real problem and gets used to avoid a different real problem. How to tell the difference, how GIN indexes actually work, and where the performance ceiling is.
Why PostgreSQL Connections Are Expensive (And What PgBouncer Does About It)
A PostgreSQL connection forks a process. At 500 connections you're in trouble. PgBouncer solves this, but session mode vs. transaction mode is a choice with real consequences.
Reading EXPLAIN ANALYZE Without Pretending It's Obvious
The query plan is not mysterious if you know what to look for. What a seq scan means in context, how to read cost estimates, and when the planner is genuinely wrong.
Your TypeScript Types Don't Exist at Runtime
TypeScript is a compile-time tool. The types are gone when the code runs. Where this bites you in production and how to close the gap at the boundaries that matter.
Drop the Content Wall
When someone asks a direct question and gets a paragraph of qualifications instead of an answer, that's a content wall. It's not careful thinking. It's avoidance.
Faster Builds with esbuild
Most TypeScript projects still use tsc for everything. esbuild strips types and transpiles fast. Here's how to use both without sacrificing type safety.
A place for writing about web development. Articles cover tooling, architecture, deployment, and the day-to-day decisions that come up when building things for the web.
