Conflict Resolution Strategies v6.2

A number of built-in conflict resolution options are available to support automatic conflict resolution. The conflict resolution options are applicable to update/update and delete/delete conflicts.

Uniqueness (insert/insert), update/delete, and delete/update conflicts are marked unresolved and must be manually reconciled.

The following are the built-in, automatic conflict resolution options.

  • Earliest Timestamp. When the earliest timestamp option is selected, the relevant rows involved in an update conflict from the source and target primary nodes are compared based on the timestamp of when the update occurred on that particular node. The row change that occurred earliest is applied. The row changes with the later timestamps are discarded.
  • Latest Timestamp. Same approach as earliest timestamp except the row change with the latest timestamp is accepted. The row changes with earlier timestamps are discarded.
  • Node Priority. The row change of the primary node with the highest node priority level is applied while the lower priority level primary node changes are discarded. The node priority level is an integer in the range of 1 to 10, inclusive where 1 is the highest priority level and 10 is the lowest priority level.
  • Custom. Custom conflict handling applies to update/update conflicts only. You must supply a PL/pgSQL program to resolve any conflicts that occur resulting from an update/update conflict. See Custom Conflict Handling for information on using custom conflict handling.

The delete/delete conflict is always resolved implicitly regardless of the conflict resolution option in effect. The net impact of a delete/delete conflict is the removal of a given row, and the row in question has already been removed the from the source and target nodes.

For the earliest timestamp and latest timestamp conflict resolution strategies, the transaction timestamp is tracked in a column with data type TIMESTAMP in the shadow table.

Once selected, the conflict resolution strategy for a given table can later be changed to a different strategy (see Updating the Conflict Resolution Options).