Adding a custom conflict-handling function v7

To add a custom conflict handling function to the primary definition node:

  1. Add the publication under the primary definition node. See Adding a publication.

  2. Add the function to the primary definition node. The following example shows adding the function using PSQL.

    edb=# \i /home/user/custom_conflict_dept.sql
    CREATE FUNCTION
  3. Open the Conflict Resolution Options tab. Select Publication > Update Publication > Conflict Resolution Options.

  4. For the table on which you want to use custom conflict handling, select Custom from the corresponding list. In the Custom Handler text box, enter the schema and function name used in the CREATE FUNCTION statement.

  5. Select Update, and then select OK in response to confirmation message.

Note

If the multi-master replication system uses custom conflict handling and you later switch the role of the primary definition node to another primary node, you must add the functions to the new primary definition node.

Note

If you want to delete the multi-master replication system, before removing the publication, remove all custom conflict-handling functions from the primary definition node.

The following example shows deleting a custom conflict function.

DROP FUNCTION edb.custom_conflict_dept(_edb_replicator_pub.rrst_edb_dept,_edb_replicator_pub.rrst_edb_dept,varchar);