# pgEdge · Spock

> Set up bidirectional logical replication with Spock 5.0.15 and understand its recovery boundary.

---

LLMS index: [llms.txt](/llms.txt)

---

Spock 5.0.15 replicates selected tables between writable PostgreSQL databases. Each node can commit locally and receive the other node’s changes asynchronously. Plan how to identify rows, arbitrate concurrent writes and recover each node before you put a table in a replication set.

1. [Create two nodes and two subscriptions](/docs/spock/two-nodes/). Start with one copy of the initial data.
2. [Choose a conflict policy and monitor apply](/docs/spock/operations/). Check both directions.
3. [Prepare standbys, PITR and rollback](/docs/spock/recovery/). Some conflict resolutions generate WAL that older kernels cannot replay.

The integrated replication component is Spock. The Mimus tests exercised two nodes, including encrypted tables and access through the MySQL and TDS clients. Deployment automation, routing and other pgEdge products require their own evaluation. [200 / 201 kernel changes](/docs/patches/spock/) · [Upstream Spock](https://github.com/pgEdge/spock)

## pgEdge extension manuals {#upstream}

The [PG.CENTER collection](/docs/spock/upstream/) covers four extensions. The r4 image uses Spock 5.0.15 at `e710faa6fe21`. It also includes LOLOR 1.2.3 and Snowflake 2.6.1. Use the three Mimus guides above to operate that version.

| Manual | Upstream reference | Purpose |
| --- | --- | --- |
| [Spock](/docs/spock/upstream/spock/) | 6.0.0-beta.2 plus 5.0 maintenance notes | Multi-master replication, conflicts, SQL API |
| [LOLOR](/docs/spock/upstream/lolor/) | 1.3.0 development snapshot | Logical replication of large objects |
| [SafeSession](/docs/spock/upstream/safesession/) | 1.1 | Enforce read-only sessions by role |
| [Snowflake](/docs/spock/upstream/snowflake/) | 2.6.1 | Generate distributed 64-bit identifiers |

---

Section pages:

- [Start two writable nodes](/docs/spock/two-nodes/): Seed the subscriber once, subscribe in reverse and prove that writes arrive in both directions.
- [Conflicts, monitoring and catch-up](/docs/spock/operations/): Choose how concurrent writes converge and diagnose a stalled subscription.
- [Recovery, failover and rollback](/docs/spock/recovery/): Identify the WAL boundary for physical recovery and the scope of logical fallback.
- [pgEdge upstream manuals](/docs/spock/upstream/): Documentation for core pgEdge extensions.

---

Backlinks:

- [Introduction](/docs/intro/)
- [Migration and operations](/docs/mssql/operations/)
- [Base · PostgreSQL 19.0](/docs/patches/base/)
- [200 / 201 · Spock](/docs/patches/spock/)
- [pgEdge upstream manuals](/docs/spock/upstream/)
- [About this site](/docs/spock/upstream/about/)
- [Sources and attribution](/docs/spock/upstream/about/attribution/)
- [License texts](/docs/spock/upstream/about/license/)
- [Maintenance and coverage](/docs/spock/upstream/about/maintenance/)
- [LOLOR](/docs/spock/upstream/lolor/)
- [Installing and Configuring lolor](/docs/spock/upstream/lolor/install-configure/)
- [lolor Release Notes](/docs/spock/upstream/lolor/lolor-release-notes/)
- [Using pg_upgrade with lolor](/docs/spock/upstream/lolor/pg-upgrade-with-lolor/)
- [Using lolor](/docs/spock/upstream/lolor/using-lolor/)
- [Quick start](/docs/spock/upstream/quick-start/)
- [SafeSession](/docs/spock/upstream/safesession/)
- [Changelog](/docs/spock/upstream/safesession/changelog/)
- [LICENCE()](/docs/spock/upstream/safesession/licence/)
- [Snowflake](/docs/spock/upstream/snowflake/)
- [Changelog](/docs/spock/upstream/snowflake/changelog/)
- [Converting a PostgreSQL Sequence to a Snowflake Sequence](/docs/spock/upstream/snowflake/converting/)
- [Creating a Snowflake Sequence in a New Cluster](/docs/spock/upstream/snowflake/creating/)
- [Reviewing Sequence Definitions in your Table Meta-data](/docs/spock/upstream/snowflake/review-seq/)
- [Snowflake Functions](/docs/spock/upstream/snowflake/snowflake-functions/)
- [Spock](/docs/spock/upstream/spock/)
- [Configuration](/docs/spock/upstream/spock/configuration/)
- [Delta apply](/docs/spock/upstream/spock/conflict-avoidance/)
- [Conflict types](/docs/spock/upstream/spock/conflicts/)
- [FAQ](/docs/spock/upstream/spock/faq/)
- [Getting started](/docs/spock/upstream/spock/getting-started/)
- [Installation](/docs/spock/upstream/spock/installation/)
- [Internals](/docs/spock/upstream/spock/internals-doc/)
- [Design decisions](/docs/spock/upstream/spock/internals-doc/design/)
- [spock Output Plugin](/docs/spock/upstream/spock/internals-doc/output/)
- [Historical plans](/docs/spock/upstream/spock/internals-doc/plans/)
- [remote_commit_ts Recovery via pg_commit_ts Scan — Implementation Plan](/docs/spock/upstream/spock/internals-doc/plans/2026-04-30-recover-remote-commit-ts-plan/)
- [Spock Protocol](/docs/spock/upstream/spock/internals-doc/protocol/)
- [Design proposals](/docs/spock/upstream/spock/internals-doc/specs/)
- [Spock Node Monitoring: Design of the spock_monitor subsystem](/docs/spock/upstream/spock/internals-doc/specs/spock-monitor-design/)
- [Eliminating the Spock checkpoint hook and per-commit WAL flush for spock.progress](/docs/spock/upstream/spock/internals-doc/specs/spock-progress-no-checkpoint-hook-design/)
- [Limitations](/docs/spock/upstream/spock/limitations/)
- [Slot failover](/docs/spock/upstream/spock/logical-slot-failover/)
- [Managing replication](/docs/spock/upstream/spock/managing/)
- [Filtering](/docs/spock/upstream/spock/managing/filtering/)
- [Using LOLOR to Manage Large objects](/docs/spock/upstream/spock/managing/lolor/)
- [Replicating Partitioned Tables](/docs/spock/upstream/spock/managing/partition-mgmt/)
- [Using Spock in Read-Only Mode](/docs/spock/upstream/spock/managing/read-only/)
- [Automatically Assigning Tables to Replication Sets](/docs/spock/upstream/spock/managing/repset-trigger/)
- [Using Spock with Snowflake Sequences](/docs/spock/upstream/spock/managing/snowflake/)
- [Automatic DDL Replication](/docs/spock/upstream/spock/managing/spock-autoddl/)
- [Changing the cluster](/docs/spock/upstream/spock/modify/)
- [Adding a Node with pgBackRest](/docs/spock/upstream/spock/modify/add-node-pgbackrest/)
- [Tutorial: Upgrading the Postgres Version In Place with pg_upgrade](/docs/spock/upstream/spock/modify/pg-upgrade-rolling-tutorial/)
- [Z0DAN](/docs/spock/upstream/spock/modify/zodan/)
- [Zodan: Zero-Downtime Node Addition for Spock](/docs/spock/upstream/spock/modify/zodan/zodan-readme/)
- [Tutorial: Updating the Postgres Version with a Rolling Update](/docs/spock/upstream/spock/modify/zodan/zodan-rolling-pg-version-tutorial/)
- [Tutorial: Adding a Node to a Cluster with Zero Downtime](/docs/spock/upstream/spock/modify/zodan/zodan-tutorial/)
- [Monitoring](/docs/spock/upstream/spock/monitoring/)
- [Lag Tracking](/docs/spock/upstream/spock/monitoring/lag-tracking/)
- [Monitoring a Node with the Spock Status Views](/docs/spock/upstream/spock/monitoring/node-monitoring/)
- [Finding Cluster Information](/docs/spock/upstream/spock/monitoring/spock-info/)
- [Using spock.sync_event to Confirm Synchronization](/docs/spock/upstream/spock/monitoring/spock-sync-event/)
- [pglogical to Spock function names](/docs/spock/upstream/spock/pgl-cheat-sheet/)
- [Recovery](/docs/spock/upstream/spock/recovery/)
- [Recovering from Catastrophic Node Failure](/docs/spock/upstream/spock/recovery/catastrophic-node-failure/)
- [Functions](/docs/spock/upstream/spock/reference/)
- [Function reference](/docs/spock/upstream/spock/reference/functions/)
- [spock.cleanup_resolutions](/docs/spock/upstream/spock/reference/functions/spock-cleanup-resolutions/)
- [spock.gen_slot_name()](/docs/spock/upstream/spock/reference/functions/spock-gen-slot-name/)
- [spock.get_country()](/docs/spock/upstream/spock/reference/functions/spock-get-country/)
- [spock.max_proto_version()](/docs/spock/upstream/spock/reference/functions/spock-max-proto-version/)
- [spock.min_proto_version()](/docs/spock/upstream/spock/reference/functions/spock-min-proto-version/)
- [spock.node_add_interface()](/docs/spock/upstream/spock/reference/functions/spock-node-add-interface/)
- [spock.node_alter()](/docs/spock/upstream/spock/reference/functions/spock-node-alter/)
- [spock.node_create()](/docs/spock/upstream/spock/reference/functions/spock-node-create/)
- [spock.node_drop()](/docs/spock/upstream/spock/reference/functions/spock-node-drop/)
- [spock.node_drop_interface()](/docs/spock/upstream/spock/reference/functions/spock-node-drop-interface/)
- [spock.node_info()](/docs/spock/upstream/spock/reference/functions/spock-node-info/)
- [spock.node_refresh_info()](/docs/spock/upstream/spock/reference/functions/spock-node-refresh-info/)
- [spock.replicate_ddl()](/docs/spock/upstream/spock/reference/functions/spock-replicate-ddl/)
- [spock.repset_add_all_seqs()](/docs/spock/upstream/spock/reference/functions/spock-repset-add-all-seqs/)
- [spock.repset_add_all_tables()](/docs/spock/upstream/spock/reference/functions/spock-repset-add-all-tables/)
- [spock.repset_add_partition()](/docs/spock/upstream/spock/reference/functions/spock-repset-add-partition/)
- [spock.repset_add_seq()](/docs/spock/upstream/spock/reference/functions/spock-repset-add-seq/)
- [spock.repset_add_table()](/docs/spock/upstream/spock/reference/functions/spock-repset-add-table/)
- [spock.repset_alter()](/docs/spock/upstream/spock/reference/functions/spock-repset-alter/)
- [spock.repset_create()](/docs/spock/upstream/spock/reference/functions/spock-repset-create/)
- [spock.repset_drop()](/docs/spock/upstream/spock/reference/functions/spock-repset-drop/)
- [spock.repset_remove_partition()](/docs/spock/upstream/spock/reference/functions/spock-repset-remove-partition/)
- [spock.repset_remove_seq()](/docs/spock/upstream/spock/reference/functions/spock-repset-remove-seq/)
- [spock.repset_remove_table()](/docs/spock/upstream/spock/reference/functions/spock-repset-remove-table/)
- [spock.repset_show_table()](/docs/spock/upstream/spock/reference/functions/spock-repset-show-table/)
- [spock.sub_add_repset()](/docs/spock/upstream/spock/reference/functions/spock-sub-add-repset/)
- [spock.sub_alter_interface()](/docs/spock/upstream/spock/reference/functions/spock-sub-alter-interface/)
- [spock.sub_alter_options()](/docs/spock/upstream/spock/reference/functions/spock-sub-alter-options/)
- [spock.sub_alter_skiplsn()](/docs/spock/upstream/spock/reference/functions/spock-sub-alter-skiplsn/)
- [spock.sub_alter_sync](/docs/spock/upstream/spock/reference/functions/spock-sub-alter-sync/)
- [spock.sub_create()](/docs/spock/upstream/spock/reference/functions/spock-sub-create/)
- [spock.sub_disable](/docs/spock/upstream/spock/reference/functions/spock-sub-disable/)
- [spock.sub_drop()](/docs/spock/upstream/spock/reference/functions/spock-sub-drop/)
- [spock.sub_enable](/docs/spock/upstream/spock/reference/functions/spock-sub-enable/)
- [spock.sub_remove_repset](/docs/spock/upstream/spock/reference/functions/spock-sub-remove-repset/)
- [spock.sub_resync_table](/docs/spock/upstream/spock/reference/functions/spock-sub-resync-table/)
- [spock.sub_show_status](/docs/spock/upstream/spock/reference/functions/spock-sub-show-status/)
- [spock.sub_show_table](/docs/spock/upstream/spock/reference/functions/spock-sub-show-table/)
- [spock.sub_wait_for_sync](/docs/spock/upstream/spock/reference/functions/spock-sub-wait-for-sync/)
- [spock.sync_event](/docs/spock/upstream/spock/reference/functions/spock-sync-event/)
- [spock.sync_seq](/docs/spock/upstream/spock/reference/functions/spock-sync-seq/)
- [spock.table_wait_for_sync()](/docs/spock/upstream/spock/reference/functions/spock-table-wait-for-sync/)
- [spock.version()](/docs/spock/upstream/spock/reference/functions/spock-version/)
- [spock.version_num()](/docs/spock/upstream/spock/reference/functions/spock-version-num/)
- [spock.wait_slot_confirm_lsn()](/docs/spock/upstream/spock/reference/functions/spock-wait-slot-confirm-lsn/)
- [spock.xact_commit_timestamp_origin()](/docs/spock/upstream/spock/reference/functions/spock-xact-commit-timestamp-origin/)
- [Management Functions](/docs/spock/upstream/spock/reference/gen-mgmt/)
- [Node Management](/docs/spock/upstream/spock/reference/node-mgmt/)
- [Replication Set Management](/docs/spock/upstream/spock/reference/repset-mgmt/)
- [Subscription Management Functions](/docs/spock/upstream/spock/reference/sub-mgmt/)
- [Resource sizing](/docs/spock/upstream/spock/sizing/)
- [Release notes](/docs/spock/upstream/spock/spock-release-notes/)
- [Troubleshooting](/docs/spock/upstream/spock/troubleshooting/)
- [Two-node tutorial](/docs/spock/upstream/spock/two-node/)
- [Upgrading](/docs/spock/upstream/spock/upgrading/)
