Replication kopiert Daten von einer Primary-Datenbank zu einem oder mehreren Replica-(Standby-)Servern — für High Availability (Failover, falls die Primary ausfällt) und Read Scaling (Verteilung von Leseanfragen). PostgreSQL nutzt hauptsächlich Streaming Replication (physisch) basierend auf dem Write-Ahead Log (WAL).
Streaming (physische) Replikation
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
