Replication એ પ્રાથમિક ડેટાબેસમાંથી એક અથવા વધુ replica (standby) સર્વર્સમાં ડેટાને નકલ કરે છે — ઉચ્ચ ઉપલબ્ધતા (primary failure પર failover) અને read scaling (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
