Conflicts, monitoring and catch-up
Design for concurrent writers
With last_update_wins and commit-timestamp tracking, a conflicting ordinary value follows the newer commit timestamp. Synchronize the node clocks. A later timestamp can discard a business change. Assign writers disjoint keys when possible and use a non-deferrable primary key for updates and deletes. Two independent sequences can allocate the same ID. Additional unique constraints can also reject an incoming row.
The balance column in the example logs its previous value. Delta Apply combines the remote change with the current local balance. In the two-node test, both sides started at 100 and committed increments of 7 and 13 while disconnected from apply. Both finished at 120. Ordinary text columns retained the winning writer’s value. Choose this policy for additive quantities. Test domain constraints such as overdraft limits separately. Spock conflict handling
Observe each direction
A subscription reports its receiver state; the provider slot shows whether a consumer is attached and how much WAL is being retained. Compare successive LSNs while generating known writes. Use spock.resolutions (with save_resolutions on) to inspect resolved conflicts and the exception log and server log to investigate apply errors. Verify the row values on both databases.
A subscriber in the integration test stopped, restarted and caught up from retained WAL. If progress stalls, check connectivity, receiver logs, slot validity, schema equality and available disk space. Preserve a needed slot while diagnosing it. An invalidated slot or missing WAL may require a new consistent copy of the data. Coordinate the authoritative copy and reconcile writes on both sides before reseeding.
Schema changes
This setup uses matching, manually created objects with automatic DDL replication off. Pause writes on both nodes, let subscriptions catch up and coordinate schema changes. Temporary and unlogged tables are outside the replication set. Evaluate dialect-specific DDL, sequence allocation and multi-subscription recovery in the application’s own rehearsal. Spock limitations
The upstream 6.0 manual introduces spock.node_report() and spock.event_history_size. The 5.0.15 extension sources used by Mimus do not define either interface. Use spock.sub_show_status() and the replication-slot queries above on this build. Upstream 6.0 monitoring changes