Sample Header Ad - 728x90

Postgresql BDR Update Update conflict detection

1 vote
1 answer
1152 views
Apparently only the new values of rows are sent between nodes on update. So how can there ever be *detectable* conflict? Node A receives an update from Node B, and a different update from node C. How can A know that there was a conflict? That the B and C updates were not conducted in some well defined order? And what does "last-update-wins" mean? Are the updates timestamped? In which case does it rely on synchronized clocks? Or does it just mean whichever update happens to get to Node A last wins? SUMMARY * Last Update Wins means based on commit time (requiring fairly synchronized clocks), and not the time a node sees an update. So should be globally consitant. * There aren't any Update/Update conflicts that are detectable (except constraint violations). And they would be difficult to resolve if they were. * Conflict resolution is row by row, not transaction by transaction. Also see http://sdf.org/~riley/blog/2016/01/04/is-bi-directional-replication-bdr-in-postgres-transactional/
Asked by Tuntable (143 rep)
May 31, 2017, 08:45 AM
Last activity: Jun 2, 2017, 06:40 AM