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 was required to be an exact copy of the upstream system. This is fine for distributing read traffic, but is somewhat limited in application since we can't simply copy a few tables, import only some data, and so on.
When logical...