Conflict logging#
To ease diagnosing and handling multi-master conflicts, PGD, by default,
logs every conflict into the bdr.conflict_history table. You can
change this behavior with more granularity using bdr.alter_node_set_log_config .
Conflict reporting#
You can summarize conflicts logged to tables in reports. Reports allow application owners to identify, understand, and resolve conflicts and introduce application changes to prevent them.
SELECT nspname, relname
, date_trunc(day, local_time) :: date AS date
, count(*)
FROM bdr.conflict_history
WHERE local_time > date_trunc(day, current_timestamp)
GROUP BY 1,2,3
ORDER BY 1,2;
nspname | relname | date | count
- --------+---------+------------+-------
my_app | test | 2019-04-05 | 1
(1 row)