Cascading replication

In the event that we have several streaming replicas, older versions of PostgreSQL required replica servers to connect directly to the primary server. For versions 9.3 and above, PostgreSQL allows streaming replicas to subscribe to other replicas. With this, we can further reduce strain on the primary database server by offloading replication duties to a topology of alternate servers.

This chaining includes backup features. The pg_basebackup tool puts PostgreSQL in backup mode by invoking the pg_start_backup() function. As this function writes to the database, it normally can't be used on a streaming replica because it's read-only. However, chaining replication makes it possible to use pg_basebackup on standby servers. ...

Get PostgreSQL High Availability Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.