Book Image

PostgreSQL 9 Administration Cookbook - Second Edition

Book Image

PostgreSQL 9 Administration Cookbook - Second Edition

Overview of this book

Table of Contents (19 chapters)
PostgreSQL 9 Administration Cookbook Second Edition
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Logical Replication


Logical Replication allows us to stream logical data changes between two nodes. By logical, we mean streaming changes without referring to specific physical attributes such as block number and row ID.

The main benefits of Logical Replication are as follows:

  • Performance is roughly two times better than that of the best trigger-based mechanisms

  • Selective replication is supported, so we don't need to replicate the entire database

  • Replication can occur between different major releases (PostgreSQL 9.4 onwards), which can allow a zero-downtime upgrade

PostgreSQL 9.4 provides a feature called Logical Decoding. This allows you to stream a set of changes out of a master server. This allows a master to become a sending node in Logical Replication. The receiving node requires the logical replication plugin to allow replication between two nodes.

Previously, we referred to physical replication as "streaming replication". Now, we have to modify our descriptions so that we can refer to ...