Skip to main content

Posts

Showing posts from 2023

Bootstraping а PostgreSQL logical replication application

Recently I was involved into a project for replicating data from PostgreSQL to Datalake. I heard about PostgreSQL logical data replication a few years ago and found a few hours to play with the Change data capture fuction of these popular database. Today's blog is all about PostgreSQL logical replication with a few fragments of code to test the functionality.  Change data capture is an architecture design principle that allows us to capture the recently data changed into the database in realtime. The changes could be any DML operations: Insert, update, delete.  TThere are a few charactaritics of CDC as follow: Logical replication uses publish-subscribe model. Subscriber pulls the data from the publication they subscribe to and manipulate the data. Only commited transactions on WAL archive (transaction log file) will be return by the CDC. CDC will return on orderd form how they commited on the database. Logical CDC doesn't impact on database performance. From the PostgreSQL v15...