Logical Replication Fundamentals
Understand the differences and advantages of logical replication compared to physical replication.
What is Logical Replication?
Welcome to Logical Replication! This powerful PostgreSQL feature lets you replicate data based on actual data changes, not just physical blocks.
Unlike physical replication, which copies entire database files or blocks, logical replication focuses on the data itself, giving you much more flexibility.
Physical vs. Logical: Core Difference
The key distinction lies in what gets replicated:
- Physical Replication: Copies raw data blocks and internal database structures. It's like taking a full snapshot of the database at a byte level.
- Logical Replication: Replicates individual data changes (INSERTs, UPDATEs, DELETEs) as logical operations. It understands 'a row was inserted' rather than 'this block changed'.
Think of it as copying a whole book (physical) versus copying just the new sentences added to specific chapters (logical).
All lessons in this course
- Logical Replication Fundamentals
- Configuring Publications
- Managing Subscriptions
- Conflict Resolution in Logical Replication