Summary
In this chapter, we discussed logical replication. We saw that logical replication is based on a concept of reverse engineering, starting with the analysis of WAL segments to extract the logical commands that have to be passed to a replica server. We saw that logical replication is useful when we want to replicate parts of databases and when we want to make hot migrations between different versions of PostgreSQL. Logical replication makes this possible because it does not binarily replicate data but, rather, extracts the logical DML commands from WAL files, which are then replicated on the replica server.
We saw how to make a logical replica in practice and have addressed some of the issues that can occur when we work with logical replication.
In the next chapter, we’ll talk about useful tools and extensions. We will see which tools are best to make life easier for a PostgreSQL DBA.