This page in other versions: 1.0 / 1.0.3

9.3. Avoiding or tolerating conflicts

In most cases appropriate application design can be used to avoid conflicts and/or the application can be made tolerant of conflicts.

Conflicts can only happen if there are things happening at the same time on multiple nodes, so the simplest way to avoid conflicts is to only ever write to one node, or to only ever write to independent subsets of the database on each node. For example, each node might have a separate schema, and while they all exchange data with each other, writes are only ever performed on the node that "owns" a given schema.

For INSERT vs INSERT conflicts, use of Global sequences can completely prevent conflicts.

BDR users may sometimes find it useful to perform distributed locking at the application level in cases where conflicts are not acceptable.

The best course of action is frequently to allow conflicts to occur and design the application to work with BDR's conflict resolution mechansisms to cope with the conflict. See Types of conflict.