Conflict Resolution in Logical Replication
Learn how conflicts arise in logical replication and the strategies PostgreSQL offers to detect and resolve them.
Why Conflicts Happen
Unlike physical replication, logical replication applies changes as SQL-level operations on the subscriber. If local data diverges from the incoming change, a conflict occurs and apply stops.
Common Conflict Types
Typical conflicts include:
- Unique violation — a row with the same key already exists
- Missing row — an UPDATE or DELETE targets a row not present on the subscriber
- Type or constraint mismatch
All lessons in this course
- Logical Replication Fundamentals
- Configuring Publications
- Managing Subscriptions
- Conflict Resolution in Logical Replication