Bi-directional logical replication in PostgreSQL: a practical guide


 

Logical replication has long been a feature of many database management systems. It’s the simple process of copying and maintaining identical data across multiple database servers. The methods taken to achieve this process, however, are quite varied – and new methods are being introduced all the time.

One of the newest methods is PostgreSQL’s bi-directional logical replication – and that’s the focus of this article.

What is logical replication?

Logical replication is how database management systems replicate changes to data. It refers to transmitting – or replicating – the “logic” of changes to data (logical), rather than copying all