Replicatie kopieert gegevens van een primaire database naar één of meer replica (standby) servers — voor hoge beschikbaarheid (failover als de primaire uitvalt) en read scaling (verdeel read queries). PostgreSQL gebruikt primair streaming replication (fysiek) op basis van het write-ahead log (WAL).
Streaming (fysieke) replicatie
Primary ──(streams WAL: the write-ahead log of changes)──▶ Replica(s)
✓ The primary handles all WRITES
✓ Replicas continuously apply the primary's WAL → stay in sync (near-real-time)
✓ Replicas can serve READ queries ("hot standby") → scale reads
