Company
Date Published
Author
Raouf Chebri
Word count
1480
Language
English
Hacker News points
2

Summary

Logical replication in Postgres, a method for Change Data Capture (CDC), allows for the synchronization of data across multiple data stores, enabling real-time analytics and minimizing latency. This feature uses a publisher-subscriber model, where the Neon database acts as a publisher, streaming changes to one or more target data stores. The Write-Ahead-Log (WAL) serves as the primary data source, capturing comprehensive sequences of data changes that are then decoded for replication purposes. Logical replication offers flexibility in selective table and column replication, and is ideal for situations requiring minimal impact on the source database or cross-version compatibility. However, it has limitations, including not being a subscriber, potentially causing replication lag, and requiring manual intervention for Data Definition Language (DDL) operations.