<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>pgEdge · Spock on Mimus</title><link>https://mimus.pgsty.com/docs/spock/</link><description>Recent content in pgEdge · Spock on Mimus</description><generator>Hugo</generator><language>en-US</language><atom:link href="https://mimus.pgsty.com/docs/spock/index.xml" rel="self" type="application/rss+xml"/><item><title>Recovery, failover and rollback</title><link>https://mimus.pgsty.com/docs/spock/recovery/</link><guid>https://mimus.pgsty.com/docs/spock/recovery/</guid><description>&lt;h2 id="prepare"&gt;Before the first subscription&#10;&lt;/h2&gt;&#10;&lt;p&gt;Upgrade physical standbys, failover hosts and PITR environments first. A new standby was able to follow a pre-Spock primary. Verify replay and the matching backup tools and keys, then switch the primary. Take a restorable base backup and record a pre-activation recovery point. Archive continuously. A backup of one node preserves that database’s physical state at its recovery point. Writes committed only on a disconnected peer require a separate reconciliation.&lt;/p&gt;</description></item><item><title>Conflicts, monitoring and catch-up</title><link>https://mimus.pgsty.com/docs/spock/operations/</link><guid>https://mimus.pgsty.com/docs/spock/operations/</guid><description>&lt;h2 id="conflicts"&gt;Design for concurrent writers&#10;&lt;/h2&gt;&#10;&lt;p&gt;With &lt;code&gt;last_update_wins&lt;/code&gt; 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.&lt;/p&gt;&#10;&lt;p&gt;The &lt;code&gt;balance&lt;/code&gt; column in the &lt;a href="https://mimus.pgsty.com/docs/spock/two-nodes/"&gt;example&lt;/a&gt; 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. &lt;a href="https://github.com/pgEdge/spock/blob/v5.0.15/docs/conflicts.md"&gt;Spock conflict handling&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Start two writable nodes</title><link>https://mimus.pgsty.com/docs/spock/two-nodes/</link><guid>https://mimus.pgsty.com/docs/spock/two-nodes/</guid><description>&lt;h2 id="prepare"&gt;Prepare the instances&#10;&lt;/h2&gt;&#10;&lt;p&gt;Start with two fresh Mimus 19.0.1 clusters on one host, A on loopback port 5541 and B on 5542. Install the paired Spock extension and output plugin in both prefixes. Configure the following on &lt;strong&gt;both&lt;/strong&gt;, merging any existing required preloads. Each cluster needs its own data directory and port. Restart both and create a database named &lt;code&gt;lab&lt;/code&gt; in each. For separate hosts replace the loopback addresses with peer-reachable addresses.&lt;/p&gt;</description></item></channel></rss>