Skip to content

Conversation

@mason-sharp
Copy link
Member

Replace Spock's custom SpockConflictType enum with PostgreSQL's ConflictType enum from replication/conflict.h. This provides more granular conflict classification and better alignment with PostgreSQL's built-in logical replication conflict handling.

Key changes:

  • Rename conflict types to match PostgreSQL conventions: • update_update → update_exists (same-value conflicts) • update_update → update_origin_differs (different-origin conflicts) • update_delete → update_missing • delete_delete → delete_missing
  • Add migration for existing spock.resolutions.conflict_type data
  • Fix header guard typo (SPOCK_CONGLICT_H → SPOCK_CONFLICT_H)
  • Expand test coverage for all conflict scenarios including insert_exists, update_missing, and delete_missing cases

The migration ensures existing conflict resolution data uses the new naming convention.

Handling for differing origins for update and delete will be improved in a later PR.

Replace Spock's custom SpockConflictType enum with PostgreSQL's
ConflictType enum from replication/conflict.h. This provides more
granular conflict classification and better alignment with PostgreSQL's
built-in logical replication conflict handling.

Key changes:
- Rename conflict types to match PostgreSQL conventions:
  • update_update → update_exists (same-value conflicts)
  • update_update → update_origin_differs (different-origin conflicts)
  • update_delete → update_missing
  • delete_delete → delete_missing
- Add migration for existing spock.resolutions.conflict_type data
- Fix header guard typo (SPOCK_CONGLICT_H → SPOCK_CONFLICT_H)
- Expand test coverage for all conflict scenarios including
  insert_exists, update_missing, and delete_missing cases

The migration ensures existing conflict resolution data uses the
new naming convention.
Copy link
Contributor

@ibrarahmad ibrarahmad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mason-sharp mason-sharp merged commit 937f2a6 into main Dec 19, 2025
5 checks passed
@mason-sharp mason-sharp deleted the task/SPOC-321/pg_conflict_types branch December 19, 2025 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants