Logical replication stops on unique constraint violation conflicts
criticalWhen logical replication attempts to INSERT or UPDATE a row that violates a NOT DEFERRABLE unique constraint on the subscriber, replication stops with an error. The conflict types insert_exists, update_exists, or multiple_unique_conflicts indicate constraint violations.
Check subscriber server logs for conflict details including LSN and replication origin. Resolve by either: 1) Changing data on subscriber to remove conflict, 2) Skipping the transaction using ALTER SUBSCRIPTION ... SKIP with the finish LSN, or 3) Using pg_replication_origin_advance() after disabling subscription with ALTER SUBSCRIPTION ... DISABLE or disable_on_error option. Enable track_commit_timestamp on subscriber for detailed conflict information including origin and commit timestamps.