CAP theorem
~11 minTwo data centres hold the same data. The link between them breaks. Each must now answer from its own copy, or refuse. CAP is the proof that there is no third way.
Trains you for PostgreSQL DBA interviews — SQL and the relational engine, replication and backup, tuning, and running clusters on Linux, Kubernetes and the cloud, plus coding and behavioral rounds.
5250 of 5250 questions in your plan: 0 known, 0 in progress, 0 due, 0 skipped, 5250 new. 0 cut, outside your plan.
Operations weigh more in a PostgreSQL DBA loop than in most database interviews. After a screen on SQL and the engine's vocabulary, the round that decides most outcomes is usually troubleshooting, built on output you are handed: an `EXPLAIN (ANALYZE, BUFFERS)` plan whose row estimates are off by orders of magnitude, a `pg_stat_activity` snapshot full of sessions waiting on a lock, or a disk filling with WAL. An architecture conversation about high availability and backup usually joins the loop at middle level and above; a scripting or algorithm exercise sometimes does too, and most loops close on a behavioral interview that leans on incidents and on-call. The questions follow cause chains. Why can one session left idle in transaction stop vacuum from removing dead rows across its whole database? Why does an `ALTER TABLE` that needs its lock for only a moment still stall the application, and what does `lock_timeout` change? Why can a replication slot nobody reads from fill the primary's disk, and why does a long report on a standby either get cancelled or, with `hot_standby_feedback` on, bloat the primary instead? Early in a career the bar is explaining a mechanism once it is named: what MVCC leaves behind, what a checkpoint flushes, what a base backup needs beside it to be restorable. Senior candidates get the symptom without the name and are expected to say which view or log they would read first, what recovery point a design actually promises, how much data an asynchronous failover can lose, and how they would rehearse a restore before the day they need one.
The plan teaches most ideas twice, first in general and then as PostgreSQL implements them. The opening stretch is engine-neutral: from [SQL](/topics/lang-sql) through [transactions and isolation](/topics/db-relational-transactions) and [index structures](/topics/db-relational-indexing) down to [storage internals](/topics/db-relational-storage-architecture) such as the buffer pool and the write-ahead log, then back up to replication, partitioning and access control. The [PostgreSQL module](/topics/db-postgresql) then cashes that groundwork in: the write-ahead log returns as [streaming replicas and slots](/topics/db-postgresql-replication-wal), and MVCC returns as dead tuple versions that [vacuum and freezing](/topics/db-postgresql-vacuum) must clean up before transaction IDs wrap around. Distributed theory comes after the engine rather than before it. Having just watched a standby fall behind, you meet [consistency models](/topics/found-eventual-consistency) and can name what an asynchronous replica gives up, which is the language the high-availability design conversation is held in. The DBA tooling module then turns the engine's mechanisms into things a team runs, such as [pooling and failover](/topics/db-pg-client-cluster) in front of the cluster and [backup managers](/topics/db-pg-backup) that keep base backups and WAL archives together. From there the plan moves under the database, because a troubleshooting round rarely stays inside it. The Linux stretch is where [I/O and CPU statistics](/topics/os-cpu-io-stats) tell a saturated disk from a bad plan, and where memory analysis explains why PostgreSQL's shared buffers sit on top of the kernel's page cache. Containers follow, and on Kubernetes the question becomes state: persistent volumes, and [operators](/topics/cloud-kubernetes-operators-crds) that run failover and backups for a cluster declared as a custom resource. Managed services then take the host away again: no shell on the server, a restricted superuser, and in [Aurora](/topics/cloud-aws-storage-data-services-aurora) replicas that share one storage volume instead of keeping their own copy. The later stretches surround the cluster. The observability module watches it, and [HAProxy](/topics/cloud-haproxy) with [Consul](/topics/cloud-consul) answer the question every failover leaves behind: how clients find the new primary. Git comes before [Ansible](/topics/cloud-ansible) because playbooks live in a repository, and [SRE practice](/topics/cloud-sre-practices) covers what owning a database on call means. The plan closes on the rounds that are not about databases: [algorithms](/topics/found-dsa) for a coding exercise and the [behavioral round](/topics/found-behavioral).
Backend developers moving into the role already write SQL and read query plans; for them the opening stretch is review, and the PostgreSQL and tooling modules are the work. Sysadmins and SREs arrive from the other side: the host, container and monitoring stretches are familiar, and their time belongs in the engine-neutral opening, because the troubleshooting questions are answered in terms of MVCC and the WAL, not the operating system. A week or two out, raising importance to must know trims the plan to its core. In the last days, switch study order to random: the troubleshooting round hops from a query plan to a lock queue to a full disk in whatever order the interviewer picks, and drilling in shuffled order is the closest rehearsal of that. The plan's automation stops at Ansible configuring servers that already exist. Declaring an RDS instance, its parameter group and its network in code is what the [Terraform roadmap](/roadmaps/terraform) covers. The pipelines that carry data out of the cluster into a warehouse, and the modeling done there, belong to the [Data Engineer roadmap](/roadmaps/data-engineer).
Two data centres hold the same data. The link between them breaks. Each must now answer from its own copy, or refuse. CAP is the proof that there is no third way.
Operations weigh more in a PostgreSQL DBA loop than in most database interviews. After a screen on SQL and the engine's vocabulary, the round that decides most outcomes is usually troubleshooting, built on output you are handed: an EXPLAIN (ANALYZE, BUFFERS) plan whose row estimates are off by orders of magnitude, a pg_stat_activity snapshot full of sessions waiting on a lock, or a disk filling with WAL. An architecture conversation about high availability and backup usually joins the loop at middle level and above; a scripting or algorithm exercise sometimes does too, and most loops close on a behavioral interview that leans on incidents and on-call.
The questions follow cause chains. Why can one session left idle in transaction stop vacuum from removing dead rows across its whole database? Why does an ALTER TABLE that needs its lock for only a moment still stall the application, and what does lock_timeout change? Why can a replication slot nobody reads from fill the primary's disk, and why does a long report on a standby either get cancelled or, with hot_standby_feedback on, bloat the primary instead?
Early in a career the bar is explaining a mechanism once it is named: what MVCC leaves behind, what a checkpoint flushes, what a base backup needs beside it to be restorable. Senior candidates get the symptom without the name and are expected to say which view or log they would read first, what recovery point a design actually promises, how much data an asynchronous failover can lose, and how they would rehearse a restore before the day they need one.
The plan teaches most ideas twice, first in general and then as PostgreSQL implements them. The opening stretch is engine-neutral: from SQL through transactions and isolation and index structures down to storage internals such as the buffer pool and the write-ahead log, then back up to replication, partitioning and access control. The PostgreSQL module then cashes that groundwork in: the write-ahead log returns as streaming replicas and slots, and MVCC returns as dead tuple versions that vacuum and freezing must clean up before transaction IDs wrap around.
Distributed theory comes after the engine rather than before it. Having just watched a standby fall behind, you meet consistency models and can name what an asynchronous replica gives up, which is the language the high-availability design conversation is held in. The DBA tooling module then turns the engine's mechanisms into things a team runs, such as pooling and failover in front of the cluster and backup managers that keep base backups and WAL archives together.
From there the plan moves under the database, because a troubleshooting round rarely stays inside it. The Linux stretch is where I/O and CPU statistics tell a saturated disk from a bad plan, and where memory analysis explains why PostgreSQL's shared buffers sit on top of the kernel's page cache. Containers follow, and on Kubernetes the question becomes state: persistent volumes, and operators that run failover and backups for a cluster declared as a custom resource. Managed services then take the host away again: no shell on the server, a restricted superuser, and in Aurora replicas that share one storage volume instead of keeping their own copy.
The later stretches surround the cluster. The observability module watches it, and HAProxy with Consul answer the question every failover leaves behind: how clients find the new primary. Git comes before Ansible because playbooks live in a repository, and SRE practice covers what owning a database on call means. The plan closes on the rounds that are not about databases: algorithms for a coding exercise and the behavioral round.
Backend developers moving into the role already write SQL and read query plans; for them the opening stretch is review, and the PostgreSQL and tooling modules are the work. Sysadmins and SREs arrive from the other side: the host, container and monitoring stretches are familiar, and their time belongs in the engine-neutral opening, because the troubleshooting questions are answered in terms of MVCC and the WAL, not the operating system.
A week or two out, raising importance to must know trims the plan to its core. In the last days, switch study order to random: the troubleshooting round hops from a query plan to a lock queue to a full disk in whatever order the interviewer picks, and drilling in shuffled order is the closest rehearsal of that.
The plan's automation stops at Ansible configuring servers that already exist. Declaring an RDS instance, its parameter group and its network in code is what the Terraform roadmap covers. The pipelines that carry data out of the cluster into a warehouse, and the modeling done there, belong to the Data Engineer roadmap.