spock
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
spock | 5.0.12 | ETL | PostgreSQL | C |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 9570 | spock | Yes | Yes | Yes | Yes | No | No | spock |
| Related | pglogical pgactive mimeo pgoutput pgl_ddl_deploy logical_ddl postgres_fdw lolor citus plproxy |
|---|
Bundled with pgEdge 15.19/16.15/17.11/18.6.
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | PIGSTY | 5.0.12 | 1817161514 | spock | - |
| RPM | PIGSTY | 18.6 | 1817161514 | pgedge-$v | - |
| DEB | PIGSTY | 18.6 | 1817161514 | pgedge-$v | - |
| OS / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
| el8.x86_64 | PIGSTY 18.6 el8.x86_64.pg18 : pgedge-18 pgedge-18-18.6-2PGSTY.el8.x86_64.rpm
| PIGSTY 17.11 el8.x86_64.pg17 : pgedge-17 pgedge-17-17.11-2PGSTY.el8.x86_64.rpm
| PIGSTY 16.15 el8.x86_64.pg16 : pgedge-16 pgedge-16-16.15-2PGSTY.el8.x86_64.rpm
| PIGSTY 15.19 el8.x86_64.pg15 : pgedge-15 pgedge-15-15.19-2PGSTY.el8.x86_64.rpm
| N/A |
| el8.aarch64 | PIGSTY 18.6 el8.aarch64.pg18 : pgedge-18 pgedge-18-18.6-2PGSTY.el8.aarch64.rpm
| PIGSTY 17.11 el8.aarch64.pg17 : pgedge-17 pgedge-17-17.11-2PGSTY.el8.aarch64.rpm
| PIGSTY 16.15 el8.aarch64.pg16 : pgedge-16 pgedge-16-16.15-2PGSTY.el8.aarch64.rpm
| PIGSTY 15.19 el8.aarch64.pg15 : pgedge-15 pgedge-15-15.19-2PGSTY.el8.aarch64.rpm
| N/A |
| el9.x86_64 | PIGSTY 18.6 el9.x86_64.pg18 : pgedge-18 pgedge-18-18.6-2PGSTY.el9.x86_64.rpm
| PIGSTY 17.11 el9.x86_64.pg17 : pgedge-17 pgedge-17-17.11-2PGSTY.el9.x86_64.rpm
| PIGSTY 16.15 el9.x86_64.pg16 : pgedge-16 pgedge-16-16.15-2PGSTY.el9.x86_64.rpm
| PIGSTY 15.19 el9.x86_64.pg15 : pgedge-15 pgedge-15-15.19-2PGSTY.el9.x86_64.rpm
| N/A |
| el9.aarch64 | PIGSTY 18.6 el9.aarch64.pg18 : pgedge-18 pgedge-18-18.6-2PGSTY.el9.aarch64.rpm
| PIGSTY 17.11 el9.aarch64.pg17 : pgedge-17 pgedge-17-17.11-2PGSTY.el9.aarch64.rpm
| PIGSTY 16.15 el9.aarch64.pg16 : pgedge-16 pgedge-16-16.15-2PGSTY.el9.aarch64.rpm
| PIGSTY 15.19 el9.aarch64.pg15 : pgedge-15 pgedge-15-15.19-2PGSTY.el9.aarch64.rpm
| N/A |
| el10.x86_64 | PIGSTY 18.6 el10.x86_64.pg18 : pgedge-18 pgedge-18-18.6-2PGSTY.el10.x86_64.rpm
| PIGSTY 17.11 el10.x86_64.pg17 : pgedge-17 pgedge-17-17.11-2PGSTY.el10.x86_64.rpm
| PIGSTY 16.15 el10.x86_64.pg16 : pgedge-16 pgedge-16-16.15-2PGSTY.el10.x86_64.rpm
| PIGSTY 15.19 el10.x86_64.pg15 : pgedge-15 pgedge-15-15.19-2PGSTY.el10.x86_64.rpm
| N/A |
| el10.aarch64 | PIGSTY 18.6 el10.aarch64.pg18 : pgedge-18 pgedge-18-18.6-2PGSTY.el10.aarch64.rpm
| PIGSTY 17.11 el10.aarch64.pg17 : pgedge-17 pgedge-17-17.11-2PGSTY.el10.aarch64.rpm
| PIGSTY 16.15 el10.aarch64.pg16 : pgedge-16 pgedge-16-16.15-2PGSTY.el10.aarch64.rpm
| PIGSTY 15.19 el10.aarch64.pg15 : pgedge-15 pgedge-15-15.19-2PGSTY.el10.aarch64.rpm
| N/A |
| d12.x86_64 | PIGSTY 18.6 d12.x86_64.pg18 : pgedge-18 pgedge-18_18.6-2PGSTY~bookworm_amd64.deb
| PIGSTY 17.11 d12.x86_64.pg17 : pgedge-17 pgedge-17_17.11-2PGSTY~bookworm_amd64.deb
| PIGSTY 16.15 d12.x86_64.pg16 : pgedge-16 pgedge-16_16.15-2PGSTY~bookworm_amd64.deb
| PIGSTY 15.19 d12.x86_64.pg15 : pgedge-15 pgedge-15_15.19-2PGSTY~bookworm_amd64.deb
| N/A |
| d12.aarch64 | PIGSTY 18.6 d12.aarch64.pg18 : pgedge-18 pgedge-18_18.6-2PGSTY~bookworm_arm64.deb
| PIGSTY 17.11 d12.aarch64.pg17 : pgedge-17 pgedge-17_17.11-2PGSTY~bookworm_arm64.deb
| PIGSTY 16.15 d12.aarch64.pg16 : pgedge-16 pgedge-16_16.15-2PGSTY~bookworm_arm64.deb
| PIGSTY 15.19 d12.aarch64.pg15 : pgedge-15 pgedge-15_15.19-2PGSTY~bookworm_arm64.deb
| N/A |
| d13.x86_64 | PIGSTY 18.6 d13.x86_64.pg18 : pgedge-18 pgedge-18_18.6-2PGSTY~trixie_amd64.deb
| PIGSTY 17.11 d13.x86_64.pg17 : pgedge-17 pgedge-17_17.11-2PGSTY~trixie_amd64.deb
| PIGSTY 16.15 d13.x86_64.pg16 : pgedge-16 pgedge-16_16.15-2PGSTY~trixie_amd64.deb
| PIGSTY 15.19 d13.x86_64.pg15 : pgedge-15 pgedge-15_15.19-2PGSTY~trixie_amd64.deb
| N/A |
| d13.aarch64 | PIGSTY 18.6 d13.aarch64.pg18 : pgedge-18 pgedge-18_18.6-2PGSTY~trixie_arm64.deb
| PIGSTY 17.11 d13.aarch64.pg17 : pgedge-17 pgedge-17_17.11-2PGSTY~trixie_arm64.deb
| PIGSTY 16.15 d13.aarch64.pg16 : pgedge-16 pgedge-16_16.15-2PGSTY~trixie_arm64.deb
| PIGSTY 15.19 d13.aarch64.pg15 : pgedge-15 pgedge-15_15.19-2PGSTY~trixie_arm64.deb
| N/A |
| u22.x86_64 | PIGSTY 18.6 u22.x86_64.pg18 : pgedge-18 pgedge-18_18.6-2PGSTY~jammy_amd64.deb
| PIGSTY 17.11 u22.x86_64.pg17 : pgedge-17 pgedge-17_17.11-2PGSTY~jammy_amd64.deb
| PIGSTY 16.15 u22.x86_64.pg16 : pgedge-16 pgedge-16_16.15-2PGSTY~jammy_amd64.deb
| PIGSTY 15.19 u22.x86_64.pg15 : pgedge-15 pgedge-15_15.19-2PGSTY~jammy_amd64.deb
| N/A |
| u22.aarch64 | PIGSTY 18.6 u22.aarch64.pg18 : pgedge-18 pgedge-18_18.6-2PGSTY~jammy_arm64.deb
| PIGSTY 17.11 u22.aarch64.pg17 : pgedge-17 pgedge-17_17.11-2PGSTY~jammy_arm64.deb
| PIGSTY 16.15 u22.aarch64.pg16 : pgedge-16 pgedge-16_16.15-2PGSTY~jammy_arm64.deb
| PIGSTY 15.19 u22.aarch64.pg15 : pgedge-15 pgedge-15_15.19-2PGSTY~jammy_arm64.deb
| N/A |
| u24.x86_64 | PIGSTY 18.6 u24.x86_64.pg18 : pgedge-18 pgedge-18_18.6-2PGSTY~noble_amd64.deb
| PIGSTY 17.11 u24.x86_64.pg17 : pgedge-17 pgedge-17_17.11-2PGSTY~noble_amd64.deb
| PIGSTY 16.15 u24.x86_64.pg16 : pgedge-16 pgedge-16_16.15-2PGSTY~noble_amd64.deb
| PIGSTY 15.19 u24.x86_64.pg15 : pgedge-15 pgedge-15_15.19-2PGSTY~noble_amd64.deb
| N/A |
| u24.aarch64 | PIGSTY 18.6 u24.aarch64.pg18 : pgedge-18 pgedge-18_18.6-2PGSTY~noble_arm64.deb
| PIGSTY 17.11 u24.aarch64.pg17 : pgedge-17 pgedge-17_17.11-2PGSTY~noble_arm64.deb
| PIGSTY 16.15 u24.aarch64.pg16 : pgedge-16 pgedge-16_16.15-2PGSTY~noble_arm64.deb
| PIGSTY 15.19 u24.aarch64.pg15 : pgedge-15 pgedge-15_15.19-2PGSTY~noble_arm64.deb
| N/A |
| u26.x86_64 | PIGSTY 18.6 u26.x86_64.pg18 : pgedge-18 pgedge-18_18.6-2PGSTY~resolute_amd64.deb
| PIGSTY 17.11 u26.x86_64.pg17 : pgedge-17 pgedge-17_17.11-2PGSTY~resolute_amd64.deb
| PIGSTY 16.15 u26.x86_64.pg16 : pgedge-16 pgedge-16_16.15-2PGSTY~resolute_amd64.deb
| PIGSTY 15.19 u26.x86_64.pg15 : pgedge-15 pgedge-15_15.19-2PGSTY~resolute_amd64.deb
| N/A |
| u26.aarch64 | PIGSTY 18.6 u26.aarch64.pg18 : pgedge-18 pgedge-18_18.6-2PGSTY~resolute_arm64.deb
| PIGSTY 17.11 u26.aarch64.pg17 : pgedge-17 pgedge-17_17.11-2PGSTY~resolute_arm64.deb
| PIGSTY 16.15 u26.aarch64.pg16 : pgedge-16 pgedge-16_16.15-2PGSTY~resolute_arm64.deb
| PIGSTY 15.19 u26.aarch64.pg15 : pgedge-15 pgedge-15_15.19-2PGSTY~resolute_arm64.deb
| N/A |
Build
You can build the RPM / DEB packages for spock using pig build:
Install
You can install spock directly. First, make sure the PGDG and PIGSTY repositories are added and enabled:
Install the extension using pig or apt/yum/dnf:
Preload:
Create Extension:
Usage
Sources:
spock provides active-active logical replication for PostgreSQL 15 through 18. Each participating database is a Spock node; a multi-master topology is formed by creating directed subscriptions between nodes.
Configuration
In postgresql.conf:
Enabling
Creating Nodes
On each node, create a node identity:
Creating Subscriptions
For multi-master, each node subscribes to every other node:
Replication Set Management
Key Features
- Multi-master (active-active) replication
- Automatic DDL replication
- Conflict detection and resolution using commit timestamps
- Row and column filtering
- Supports PostgreSQL 15, 16, 17, and 18
- Tables must have primary keys and matching schemas across nodes
Operations and Caveats
- Install
spockand add it toshared_preload_librarieson every participating server before creating nodes or subscriptions. - Keep table definitions, data types, primary keys, and relevant unique indexes identical across nodes. Coordinate DDL even when DDL replication is enabled.
- Replicated tables need a primary key or another usable replica identity. Temporary and unlogged tables are not replication targets.
- Spock operates per database. Repeat extension and topology setup for each database that participates.
- Active-active conflict handling depends on commit timestamps and policy. Test simultaneous inserts and updates, especially nullable unique keys, before production use.
- Upstream documents platform/build requirements in the README; verify that the PostgreSQL build and Spock package used on every node are compatible.
Version 5.0.12 and Upgrades
Spock requires the version-specific PostgreSQL core patches described in the upstream README; matching the major version alone is insufficient. Use a compatible core, such as the matching pgEdge build, on every node. Shared preload changes require a restart. Upstream adds preliminary PostgreSQL 19 support in 5.0.12 but explicitly excludes production support for that beta; current Pigsty pgEdge builds cover 15–18.
PostgreSQL servers carrying the output-plugin security fix require spock_output in output_plugin_libraries, including on physical standbys that may become publishers. Check that the parameter exists first:
Only when the query returns a non-null value, add the plugin while retaining other required entries:
An unknown parameter prevents older servers from starting. The allowlist check also applies when decoding resumes on an existing slot, so plan this setting before a PostgreSQL minor-version upgrade.
The 5.0.12 patch has no schema changes. It retries transient apply failures without advancing the replication origin, repairs replay/exception handling and generated-column replication, and validates received tuple metadata. Permanent schema drift still needs repair; a restarting worker is not evidence that replication is healthy. Review replication lag, exception state and subscriptions after upgrading each node.
Version 5.0.11 introduced spock.use_native_failover_slots; changing it requires a restart. Its native-slot behavior depends on PostgreSQL 17 or later, and failover setup needs the dedicated upstream runbook. Do not enable it merely because a cluster has a standby.
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)