Course map
Stage 1: Foundation
Stage 2: Intermediate
Stage 3: Advanced
Stage 4: Performance & internals
Stage 5: Specialization

Stage 5 track

Track C: Database Administrator & Platform

Goal: Run PostgreSQL people can bet a business on — configuration, hardening, backups you have actually restored, replication and failover, partitioning, monitoring, upgrades — capped by a production runbook with a timed restore drill. Time: 4–6 weeks alongside the capstone · Builds on: Stages 3 and 4 throughout

Who this track is for

You're the person who wants to own the database tier — DBA, platform engineer, SRE with data gravity. Part 15 was your favourite; this track is Part 15 grown up.

The path

1. The configuration files. Two files govern a cluster: postgresql.conf (every setting — you know the first four from Part 18) and pg_hba.conf — host-based authentication: who may connect, from where, to what, proving identity how. Read a default pg_hba.conf line by line until nothing in it is mysterious; most "cannot connect" tickets die here.

2. Security hardening. scram-sha-256 for passwords (never trust/md5 beyond a laptop), TLS on every non-local connection, no app login without a password-independent path to rotate it, and the Track B role discipline applied cluster-wide. Log connections and DDL; auditors will ask.

3. Logical backups. pg_dump/pg_restore: portable, per-database, restorable with surgical precision (one table if needed). Custom format (-Fc), parallel restore (-j). Their limit: a dump is a moment — everything since is gone. Which is why:

4. Physical backups and PITR. Continuous archiving: a pg_basebackup plus every WAL segment since (Part 15's WAL, now a backup strategy) lets you restore to any moment — "to 14:59, right before the bad DELETE". Point-in-time recovery is the skill that defines this job, and it only exists if you have drilled it: an unrestored backup is a hope, not a backup.

5. Replication. Ship WAL to a standby continuously and it stays seconds behind: streaming replication — a full-cluster hot copy, readable for reporting. Logical replication publishes row-changes per table instead — selective, cross-version, the migration workhorse. Know the trade: streaming = everything, identical, fast; logical = chosen tables, flexible, more care.

6. High availability. Failover = promoting a standby when the primary dies — and the hard problems are deciding when (split-brain is worse than downtime) and repointing clients. Patroni automates the consensus; your job is understanding what it does well enough to trust it at 3 am.

7. Partitioning. Declarative partitioning splits one huge table into range/list/hash children: the planner prunes untouched partitions (Part 16 instincts apply per-child), and — the operational win — dropping an old month is DROP TABLE, not a million-row DELETE plus vacuum debt (Part 15 explains why that matters).

8. Monitoring. The views you already know, watched continuously: pg_stat_activity (sessions, waits), pg_stat_user_tables (dead tuples — autovacuum keeping up?), pg_stat_statements (Part 18), replication lag (pg_stat_replication), the full stats catalogue. Alert on lag, bloat growth, connection saturation, and long-idle-in-transaction sessions — every one a Part 12/15 lesson with a pager attached.

9. Upgrades. Minor versions (17.4 → 17.5): binary swap and restart, always current. Major versions: pg_upgrade (fast, in place, --link) or logical replication for near-zero downtime. Read release notes like a professional: what changed in the planner is the section that bites.

10. Managed PostgreSQL. RDS, Cloud SQL and friends take hardware, backups-as-a-button, minor upgrades and HA plumbing — you keep schema, queries, indexes, roles, tuning, and verifying their backups restore. This whole course is the part they don't manage.

Capstone: the production runbook

On two machines, VMs or containers:

  1. A primary configured from scratch — hardened pg_hba.conf, scram auth, sane Part 18 settings, WAL archiving on.
  2. A streaming standby, with a documented, rehearsed failover (and fail-back).
  3. Scheduled base backups + WAL archiving — and a timed PITR drill: drop a table "accidentally" at a known second, restore to the second before, record the stopwatch.
  4. A monitoring sheet: the six queries you'd run first in an incident, saved and explained.
  5. A one-page runbook per scenario: disk filling, replication lag, wraparound warning, failover.

Done when: a colleague who has never seen the setup can execute the PITR drill from your runbook alone, inside your recorded time.

Read more

Search the guide