Replication एक प्राथमिक डेटाबेसमधून डेटा एक किंवा अधिक replica (standby) सर्व्हरला कॉपी करते — उच्च उपलब्धता (primary विफल झाल्यास 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
