Skip to main content

Replication and High Availability for PostgreSQL DBAs

Replication and high availability keep PostgreSQL running when a server fails. Streaming replication ships WAL to physical standbys, logical replication copies selected tables through publications and subscriptions, and tools such as Patroni automate failover. It is the availability stage of the PostgreSQL DBA path.

Stage: Reliability · Part of the PostgreSQL DBA roadmap · Last reviewed 19 November 2026

What to learn in Replication and High Availability

Replication and High Availability interview questions

What risk does an inactive replication slot create?

A slot makes the primary retain WAL until the consumer has received it. If the standby is down or slow, WAL accumulates and can fill the primary's disk. Monitor slots, and set max_slot_wal_keep_size to cap the retention.

What is the difference between physical and logical replication?

Physical replication streams WAL to build an identical standby of the whole cluster, ideal for failover and read replicas. Logical replication decodes changes per table, allowing different major versions, selected tables and writable targets, but schema changes must be applied separately.

Where Replication and High Availability fits in the PostgreSQL DBA roadmap

Replication and High Availability belongs to the Reliability stage (intermediate level), which takes about 4 hours. Never lose data.

Back to the full PostgreSQL DBA roadmap