Posts tagged: postgresql
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.
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.
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.
Partitions vs Table Inheritance in PostgreSQL
PostgreSQL has two ways to split large tables. Declarative partitioning is newer and simpler. Table inheritance is older, more flexible, and has more footguns.
What BRIN Indexes Are Good For (and Why the Use Case Matters)
BRIN indexes are tiny and nearly free to maintain. They are also nearly useless unless your data has strong physical correlation with the indexed column.
What Is Fill Factor and When to Use It
Fill factor controls how full PostgreSQL allows heap pages to get. Lower fill factor preserves room for updates, which keeps HOT updates working and reduces bloat.
Schema Migrations Without Downtime (and Why You Should Practice Now)
Most teams avoid schema migrations until they're forced to do one at 3am. Better to practice when stakes are low.
