Replication ఒక primary డేటాబేస్ నుండి ఒకటి లేదా అంతకంటే ఎక్కువ replica (standby) సర్వర్లకు డేటాను కాపీ చేస్తుంది — అధిక లభ్యత కోసం (primary విఫలమైతే failover) మరియు read స్కేలింగ్ కోసం (read queries పంపిణీ చేయండి). PostgreSQL ప్రధానంగా streaming replication (physical) ను ఉపయోగిస్తుంది write-ahead log (WAL) ఆధారంగా.
Streaming (physical) replication
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
