11. Streaming Replication
PostgreSQL 9.1 implemented synchronous streaming replication. It is a single-master-multiple-slaves type of replication, where the terms primary and standbys usually refer to the master and slaves, respectively.
This native replication feature is based on log shipping, a general replication technique. In this process, the primary server continuously sends WAL data to the standby servers, which then replay the received data immediately.
This chapter focuses on the internal mechanisms of streaming replication and covers the following topics:
- How streaming replication starts up.
- How data is transferred between the primary and standby servers.
- How the primary server manages multiple standby servers.
- The functionality of Replication Slots introduced in version 9.4.
Chapter Contents
Historical Information
Although version 9.0 implemented the first replication feature for asynchronous replication only, a new implementation for synchronous replication (currently in use) replaced it in version 9.1.