Overview of multi-master

Consider the following diagram:

We can see in preceding diagram that there are two PostgreSQL nodes: Node A sends data from the WAL to Node B via WAL streaming, a feature that has been available since PostgreSQL 9.0.

The primary divergence here from regular streaming replication is the element labeled LD, which in this case stands for logical decoder. Node B contains a similar additional element that we've labeled LA for logical apply.

In standard streaming replication, WAL is transmitted unchanged and applied to the data files exactly as it is received. While fast and efficient, this meant that every streaming replica ...

Get PostgreSQL 12 High Availability Cookbook 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.