database

Logical Replication

Logical replication is a database replication method that replicates data changes based on the logical content of database objects, such as tables and rows, rather than physical storage blocks. It captures changes (inserts, updates, deletes) from a source database and applies them to a target database, often supporting cross-version or cross-platform replication. This approach enables selective replication of specific tables or data subsets, making it useful for data distribution, reporting, and high availability setups.

Also known as: Logical Replication, Logical Replication in PostgreSQL, Logical Streaming Replication, Logical Replication Method, Logical Data Replication
🧊Why learn Logical Replication?

Developers should use logical replication when they need to replicate specific tables or data subsets across different database versions or platforms, such as migrating from PostgreSQL 12 to 14 or syncing data between PostgreSQL and other systems. It is ideal for scenarios like offloading reporting queries to a replica, distributing data across multiple locations, or implementing real-time data integration in microservices architectures, as it offers fine-grained control and flexibility compared to physical replication.

Compare Logical Replication

Learning Resources

Related Tools

Alternatives to Logical Replication