PostgreSQL — Learning Roadmap
Estimated Time to Job-Ready
6-9 weeks of consistent learning (2-3 hours/day), assuming basic SQL fluency already — PostgreSQL-specific material (JSONB, advanced indexing, MVCC internals) builds directly on standard SQL rather than re-teaching it.
Phase 1: Foundation (Week 1-2)
psql — \dt, \d tablename, \di, \x, \timing are the commands you'll use daily
JSONB, arrays, NUMERIC vs FLOAT, TIMESTAMPTZ vs TIMESTAMP
BEGIN, COMMIT, ROLLBACK, SAVEPOINT
Checkpoint: can you explain why TIMESTAMPTZ is almost always the right choice over plain TIMESTAMP, even for a single-timezone application? (TIMESTAMP silently drops timezone information, which becomes a real bug the moment the server, a client, or a future deployment region uses a different timezone.)
Phase 2: Indexing, JSONB, and Query Performance (Week 3-4)
EXPLAIN and EXPLAIN ANALYZE — the difference matters: EXPLAIN shows the planned execution, EXPLAIN ANALYZE actually runs the query and shows real timings alongside the plan
GIN (JSONB, full-text, arrays), GiST (geometric/range types, also used by PostGIS), BRIN (huge, naturally-ordered tables like time-series logs), partial indexes, expression indexes
@> containment, ->/->> extraction, and when a GIN index on a JSONB column actually gets used vs. skipped
Checkpoint: given a slow query with EXPLAIN ANALYZE showing a sequential scan on a large table, what's your first diagnostic question — is a usable index missing, or does one exist but the planner isn't choosing it (and why might that be)?
Phase 3: MVCC, Vacuum, and Operational Reality (Week 5-6)
UPDATE/DELETE don't actually remove old row versions immediately — they mark them dead, and VACUUM is what reclaims that space
UPDATE churn and default autovacuum settings can bloat significantly, and what symptoms that produces (slower queries, larger table size than the data justifies)
READ COMMITTED) vs. what SERIALIZABLE guarantees and costs
pg_dump/pg_restore, and understand replication basics (streaming replication, WAL shipping) even if you don't set up a full cluster
Checkpoint: can you explain, in your own words, why a PostgreSQL table that's had millions of rows deleted might still be nearly the same size on disk until VACUUM (or VACUUM FULL) runs? If this is unclear, spend more time here — it's a real production issue people hit and a common interview topic specifically because it's PostgreSQL-distinctive (MySQL/InnoDB doesn't work this way).
Phase 4: Extensions, Scaling, and Interview Readiness (Week 7-8)
pg_vector/pgvector (embeddings/similarity search), TimescaleDB (time-series) — you don't need deep expertise in all of them, but you should recognize the problem each solves
Common Pitfalls Specific to PostgreSQL (Not Generic Study Advice)
TIMESTAMP instead of TIMESTAMPTZ by habit — this is one of the most common "worked fine in dev, broke across timezones in production" bugs
SELECT COUNT(*) is cheap — unlike MyISAM's stored row count, PostgreSQL (like InnoDB) has to actually count matching rows under MVCC, which can be slow on large tables

