跳转到主要内容

pgactive

Active-Active Replication Extension for PostgreSQL

pgactive : Active-Active Replication Extension for PostgreSQL

Overview

ID Extension Package Version Category License Language
9560 pgactive pgactive 2.1.10 ETL Apache-2.0 C
Attribute Has Binary Has Library Need Load Has DDL Relocatable Trusted
--sLd-- Yes Yes Yes Yes no no
SQL 2.1.8.

Packages

Type Repo Version PG Major Compatibility Package Pattern Dependencies
EXT PIGSTY 2.1.10 19 18 17 16 15 pgactive -
RPM PIGSTY 2.1.10 19 18 17 16 15 pgactive_$v -
DEB PIGSTY 2.1.10 19 18 17 16 15 postgresql-$v-pgactive -
Linux / PG PG19 PG18 PG17 PG16 PG15
el8.x86_64 N/A PIGSTY 2.1.10 PIGSTY 2.1.10 PIGSTY 2.1.10 PIGSTY 2.1.10
el8.aarch64 N/A PIGSTY 2.1.10 PIGSTY 2.1.10 PIGSTY 2.1.10 PIGSTY 2.1.10
el9.x86_64 PIGSTY 2.1.10 PIGSTY 2.1.10 PIGSTY 2.1.10 PIGSTY 2.1.10 PIGSTY 2.1.10
el9.aarch64 PIGSTY 2.1.10 PIGSTY 2.1.10 PIGSTY 2.1.10 PIGSTY 2.1.10 PIGSTY 2.1.10
el10.x86_64 PIGSTY 2.1.10 PIGSTY 2.1.10 PIGSTY 2.1.10 PIGSTY 2.1.10 PIGSTY 2.1.10
el10.aarch64 PIGSTY 2.1.10 PIGSTY 2.1.10 PIGSTY 2.1.10 PIGSTY 2.1.10 PIGSTY 2.1.10
d12.x86_64 PIGSTY 2.1.10 PIGSTY 2.1.10 PIGSTY 2.1.10 PIGSTY 2.1.10 PIGSTY 2.1.10
d12.aarch64 PIGSTY 2.1.10 PIGSTY 2.1.10 PIGSTY 2.1.10 PIGSTY 2.1.10 PIGSTY 2.1.10
d13.x86_64 PIGSTY 2.1.10 PIGSTY 2.1.10 PIGSTY 2.1.10 PIGSTY 2.1.10 PIGSTY 2.1.10
d13.aarch64 PIGSTY 2.1.10 PIGSTY 2.1.10 PIGSTY 2.1.10 PIGSTY 2.1.10 PIGSTY 2.1.10
u22.x86_64 PIGSTY 2.1.10 PIGSTY 2.1.10 PIGSTY 2.1.10 PIGSTY 2.1.10 PIGSTY 2.1.10
u22.aarch64 PIGSTY 2.1.10 PIGSTY 2.1.10 PIGSTY 2.1.10 PIGSTY 2.1.10 PIGSTY 2.1.10
u24.x86_64 PIGSTY 2.1.10 PIGSTY 2.1.10 PIGSTY 2.1.10 PIGSTY 2.1.10 PIGSTY 2.1.10
u24.aarch64 PIGSTY 2.1.10 PIGSTY 2.1.10 PIGSTY 2.1.10 PIGSTY 2.1.10 PIGSTY 2.1.10
u26.x86_64 PIGSTY 2.1.10 PIGSTY 2.1.10 PIGSTY 2.1.10 PIGSTY 2.1.10 PIGSTY 2.1.10
u26.aarch64 PIGSTY 2.1.10 PIGSTY 2.1.10 PIGSTY 2.1.10 PIGSTY 2.1.10 PIGSTY 2.1.10
Package Version OS ORG SIZE File URL
pgactive_19 2.1.10 el9.x86_64 pigsty 639.5 KiB pgactive_19-2.1.10-1PGSTY.el9.x86_64.rpm
pgactive_19 2.1.10 el9.aarch64 pigsty 627.5 KiB pgactive_19-2.1.10-1PGSTY.el9.aarch64.rpm
pgactive_19 2.1.10 el10.x86_64 pigsty 646.4 KiB pgactive_19-2.1.10-1PGSTY.el10.x86_64.rpm
pgactive_19 2.1.10 el10.aarch64 pigsty 636.4 KiB pgactive_19-2.1.10-1PGSTY.el10.aarch64.rpm
postgresql-19-pgactive 2.1.10 d12.x86_64 pigsty 597.8 KiB postgresql-19-pgactive_2.1.10-1PGSTY~bookworm_amd64.deb
postgresql-19-pgactive 2.1.10 d12.aarch64 pigsty 572.6 KiB postgresql-19-pgactive_2.1.10-1PGSTY~bookworm_arm64.deb
postgresql-19-pgactive 2.1.10 d13.x86_64 pigsty 599.0 KiB postgresql-19-pgactive_2.1.10-1PGSTY~trixie_amd64.deb
postgresql-19-pgactive 2.1.10 d13.aarch64 pigsty 576.4 KiB postgresql-19-pgactive_2.1.10-1PGSTY~trixie_arm64.deb
postgresql-19-pgactive 2.1.10 u22.x86_64 pigsty 651.8 KiB postgresql-19-pgactive_2.1.10-1PGSTY~jammy_amd64.deb
postgresql-19-pgactive 2.1.10 u22.aarch64 pigsty 641.2 KiB postgresql-19-pgactive_2.1.10-1PGSTY~jammy_arm64.deb
postgresql-19-pgactive 2.1.10 u24.x86_64 pigsty 631.8 KiB postgresql-19-pgactive_2.1.10-1PGSTY~noble_amd64.deb
postgresql-19-pgactive 2.1.10 u24.aarch64 pigsty 625.1 KiB postgresql-19-pgactive_2.1.10-1PGSTY~noble_arm64.deb
postgresql-19-pgactive 2.1.10 u26.x86_64 pigsty 628.2 KiB postgresql-19-pgactive_2.1.10-1PGSTY~resolute_amd64.deb
postgresql-19-pgactive 2.1.10 u26.aarch64 pigsty 619.2 KiB postgresql-19-pgactive_2.1.10-1PGSTY~resolute_arm64.deb
Package Version OS ORG SIZE File URL
pgactive_18 2.1.10 el8.x86_64 pigsty 646.7 KiB pgactive_18-2.1.10-1PGSTY.el8.x86_64.rpm
pgactive_18 2.1.9 el8.x86_64 pigsty 642.6 KiB pgactive_18-2.1.9-1PGSTY.el8.x86_64.rpm
pgactive_18 2.1.10 el8.aarch64 pigsty 624.8 KiB pgactive_18-2.1.10-1PGSTY.el8.aarch64.rpm
pgactive_18 2.1.9 el8.aarch64 pigsty 623.1 KiB pgactive_18-2.1.9-1PGSTY.el8.aarch64.rpm
pgactive_18 2.1.10 el9.x86_64 pigsty 636.3 KiB pgactive_18-2.1.10-1PGSTY.el9.x86_64.rpm
pgactive_18 2.1.9 el9.x86_64 pigsty 634.4 KiB pgactive_18-2.1.9-1PGSTY.el9.x86_64.rpm
pgactive_18 2.1.10 el9.aarch64 pigsty 624.6 KiB pgactive_18-2.1.10-1PGSTY.el9.aarch64.rpm
pgactive_18 2.1.9 el9.aarch64 pigsty 623.1 KiB pgactive_18-2.1.9-1PGSTY.el9.aarch64.rpm
pgactive_18 2.1.10 el10.x86_64 pigsty 643.0 KiB pgactive_18-2.1.10-1PGSTY.el10.x86_64.rpm
pgactive_18 2.1.9 el10.x86_64 pigsty 638.9 KiB pgactive_18-2.1.9-1PGSTY.el10.x86_64.rpm
pgactive_18 2.1.10 el10.aarch64 pigsty 632.5 KiB pgactive_18-2.1.10-1PGSTY.el10.aarch64.rpm
pgactive_18 2.1.9 el10.aarch64 pigsty 628.1 KiB pgactive_18-2.1.9-1PGSTY.el10.aarch64.rpm
postgresql-18-pgactive 2.1.10 d12.x86_64 pigsty 595.1 KiB postgresql-18-pgactive_2.1.10-1PGSTY~bookworm_amd64.deb
postgresql-18-pgactive 2.1.10 d12.aarch64 pigsty 569.0 KiB postgresql-18-pgactive_2.1.10-1PGSTY~bookworm_arm64.deb
postgresql-18-pgactive 2.1.10 d13.x86_64 pigsty 596.0 KiB postgresql-18-pgactive_2.1.10-1PGSTY~trixie_amd64.deb
postgresql-18-pgactive 2.1.10 d13.aarch64 pigsty 571.4 KiB postgresql-18-pgactive_2.1.10-1PGSTY~trixie_arm64.deb
postgresql-18-pgactive 2.1.10 u22.x86_64 pigsty 647.3 KiB postgresql-18-pgactive_2.1.10-1PGSTY~jammy_amd64.deb
postgresql-18-pgactive 2.1.10 u22.aarch64 pigsty 635.8 KiB postgresql-18-pgactive_2.1.10-1PGSTY~jammy_arm64.deb
postgresql-18-pgactive 2.1.10 u24.x86_64 pigsty 628.6 KiB postgresql-18-pgactive_2.1.10-1PGSTY~noble_amd64.deb
postgresql-18-pgactive 2.1.10 u24.aarch64 pigsty 621.7 KiB postgresql-18-pgactive_2.1.10-1PGSTY~noble_arm64.deb
postgresql-18-pgactive 2.1.10 u26.x86_64 pigsty 624.6 KiB postgresql-18-pgactive_2.1.10-1PGSTY~resolute_amd64.deb
postgresql-18-pgactive 2.1.10 u26.aarch64 pigsty 616.1 KiB postgresql-18-pgactive_2.1.10-1PGSTY~resolute_arm64.deb
Package Version OS ORG SIZE File URL
pgactive_17 2.1.10 el8.x86_64 pigsty 637.9 KiB pgactive_17-2.1.10-1PGSTY.el8.x86_64.rpm
pgactive_17 2.1.9 el8.x86_64 pigsty 634.3 KiB pgactive_17-2.1.9-1PGSTY.el8.x86_64.rpm
pgactive_17 2.1.10 el8.aarch64 pigsty 617.0 KiB pgactive_17-2.1.10-1PGSTY.el8.aarch64.rpm
pgactive_17 2.1.9 el8.aarch64 pigsty 615.4 KiB pgactive_17-2.1.9-1PGSTY.el8.aarch64.rpm
pgactive_17 2.1.10 el9.x86_64 pigsty 628.2 KiB pgactive_17-2.1.10-1PGSTY.el9.x86_64.rpm
pgactive_17 2.1.9 el9.x86_64 pigsty 626.0 KiB pgactive_17-2.1.9-1PGSTY.el9.x86_64.rpm
pgactive_17 2.1.10 el9.aarch64 pigsty 616.9 KiB pgactive_17-2.1.10-1PGSTY.el9.aarch64.rpm
pgactive_17 2.1.9 el9.aarch64 pigsty 615.7 KiB pgactive_17-2.1.9-1PGSTY.el9.aarch64.rpm
pgactive_17 2.1.10 el10.x86_64 pigsty 633.9 KiB pgactive_17-2.1.10-1PGSTY.el10.x86_64.rpm
pgactive_17 2.1.9 el10.x86_64 pigsty 630.4 KiB pgactive_17-2.1.9-1PGSTY.el10.x86_64.rpm
pgactive_17 2.1.10 el10.aarch64 pigsty 624.5 KiB pgactive_17-2.1.10-1PGSTY.el10.aarch64.rpm
pgactive_17 2.1.9 el10.aarch64 pigsty 620.2 KiB pgactive_17-2.1.9-1PGSTY.el10.aarch64.rpm
postgresql-17-pgactive 2.1.10 d12.x86_64 pigsty 587.9 KiB postgresql-17-pgactive_2.1.10-1PGSTY~bookworm_amd64.deb
postgresql-17-pgactive 2.1.10 d12.aarch64 pigsty 561.9 KiB postgresql-17-pgactive_2.1.10-1PGSTY~bookworm_arm64.deb
postgresql-17-pgactive 2.1.10 d13.x86_64 pigsty 589.2 KiB postgresql-17-pgactive_2.1.10-1PGSTY~trixie_amd64.deb
postgresql-17-pgactive 2.1.10 d13.aarch64 pigsty 564.0 KiB postgresql-17-pgactive_2.1.10-1PGSTY~trixie_arm64.deb
postgresql-17-pgactive 2.1.10 u22.x86_64 pigsty 714.6 KiB postgresql-17-pgactive_2.1.10-1PGSTY~jammy_amd64.deb
postgresql-17-pgactive 2.1.10 u22.aarch64 pigsty 704.8 KiB postgresql-17-pgactive_2.1.10-1PGSTY~jammy_arm64.deb
postgresql-17-pgactive 2.1.10 u24.x86_64 pigsty 620.2 KiB postgresql-17-pgactive_2.1.10-1PGSTY~noble_amd64.deb
postgresql-17-pgactive 2.1.10 u24.aarch64 pigsty 614.0 KiB postgresql-17-pgactive_2.1.10-1PGSTY~noble_arm64.deb
postgresql-17-pgactive 2.1.10 u26.x86_64 pigsty 616.6 KiB postgresql-17-pgactive_2.1.10-1PGSTY~resolute_amd64.deb
postgresql-17-pgactive 2.1.10 u26.aarch64 pigsty 608.6 KiB postgresql-17-pgactive_2.1.10-1PGSTY~resolute_arm64.deb
Package Version OS ORG SIZE File URL
pgactive_16 2.1.10 el8.x86_64 pigsty 632.1 KiB pgactive_16-2.1.10-1PGSTY.el8.x86_64.rpm
pgactive_16 2.1.9 el8.x86_64 pigsty 628.8 KiB pgactive_16-2.1.9-1PGSTY.el8.x86_64.rpm
pgactive_16 2.1.10 el8.aarch64 pigsty 611.2 KiB pgactive_16-2.1.10-1PGSTY.el8.aarch64.rpm
pgactive_16 2.1.9 el8.aarch64 pigsty 609.6 KiB pgactive_16-2.1.9-1PGSTY.el8.aarch64.rpm
pgactive_16 2.1.10 el9.x86_64 pigsty 623.0 KiB pgactive_16-2.1.10-1PGSTY.el9.x86_64.rpm
pgactive_16 2.1.9 el9.x86_64 pigsty 620.9 KiB pgactive_16-2.1.9-1PGSTY.el9.x86_64.rpm
pgactive_16 2.1.10 el9.aarch64 pigsty 611.4 KiB pgactive_16-2.1.10-1PGSTY.el9.aarch64.rpm
pgactive_16 2.1.9 el9.aarch64 pigsty 610.2 KiB pgactive_16-2.1.9-1PGSTY.el9.aarch64.rpm
pgactive_16 2.1.10 el10.x86_64 pigsty 629.3 KiB pgactive_16-2.1.10-1PGSTY.el10.x86_64.rpm
pgactive_16 2.1.9 el10.x86_64 pigsty 625.8 KiB pgactive_16-2.1.9-1PGSTY.el10.x86_64.rpm
pgactive_16 2.1.10 el10.aarch64 pigsty 619.6 KiB pgactive_16-2.1.10-1PGSTY.el10.aarch64.rpm
pgactive_16 2.1.9 el10.aarch64 pigsty 615.1 KiB pgactive_16-2.1.9-1PGSTY.el10.aarch64.rpm
postgresql-16-pgactive 2.1.10 d12.x86_64 pigsty 583.2 KiB postgresql-16-pgactive_2.1.10-1PGSTY~bookworm_amd64.deb
postgresql-16-pgactive 2.1.10 d12.aarch64 pigsty 557.9 KiB postgresql-16-pgactive_2.1.10-1PGSTY~bookworm_arm64.deb
postgresql-16-pgactive 2.1.10 d13.x86_64 pigsty 585.0 KiB postgresql-16-pgactive_2.1.10-1PGSTY~trixie_amd64.deb
postgresql-16-pgactive 2.1.10 d13.aarch64 pigsty 559.4 KiB postgresql-16-pgactive_2.1.10-1PGSTY~trixie_arm64.deb
postgresql-16-pgactive 2.1.10 u22.x86_64 pigsty 703.1 KiB postgresql-16-pgactive_2.1.10-1PGSTY~jammy_amd64.deb
postgresql-16-pgactive 2.1.10 u22.aarch64 pigsty 693.8 KiB postgresql-16-pgactive_2.1.10-1PGSTY~jammy_arm64.deb
postgresql-16-pgactive 2.1.10 u24.x86_64 pigsty 615.6 KiB postgresql-16-pgactive_2.1.10-1PGSTY~noble_amd64.deb
postgresql-16-pgactive 2.1.10 u24.aarch64 pigsty 608.8 KiB postgresql-16-pgactive_2.1.10-1PGSTY~noble_arm64.deb
postgresql-16-pgactive 2.1.10 u26.x86_64 pigsty 612.7 KiB postgresql-16-pgactive_2.1.10-1PGSTY~resolute_amd64.deb
postgresql-16-pgactive 2.1.10 u26.aarch64 pigsty 603.9 KiB postgresql-16-pgactive_2.1.10-1PGSTY~resolute_arm64.deb
Package Version OS ORG SIZE File URL
pgactive_15 2.1.10 el8.x86_64 pigsty 623.3 KiB pgactive_15-2.1.10-1PGSTY.el8.x86_64.rpm
pgactive_15 2.1.9 el8.x86_64 pigsty 621.9 KiB pgactive_15-2.1.9-1PGSTY.el8.x86_64.rpm
pgactive_15 2.1.10 el8.aarch64 pigsty 601.7 KiB pgactive_15-2.1.10-1PGSTY.el8.aarch64.rpm
pgactive_15 2.1.9 el8.aarch64 pigsty 602.0 KiB pgactive_15-2.1.9-1PGSTY.el8.aarch64.rpm
pgactive_15 2.1.10 el9.x86_64 pigsty 617.7 KiB pgactive_15-2.1.10-1PGSTY.el9.x86_64.rpm
pgactive_15 2.1.9 el9.x86_64 pigsty 617.7 KiB pgactive_15-2.1.9-1PGSTY.el9.x86_64.rpm
pgactive_15 2.1.10 el9.aarch64 pigsty 607.0 KiB pgactive_15-2.1.10-1PGSTY.el9.aarch64.rpm
pgactive_15 2.1.9 el9.aarch64 pigsty 606.7 KiB pgactive_15-2.1.9-1PGSTY.el9.aarch64.rpm
pgactive_15 2.1.10 el10.x86_64 pigsty 623.2 KiB pgactive_15-2.1.10-1PGSTY.el10.x86_64.rpm
pgactive_15 2.1.9 el10.x86_64 pigsty 622.1 KiB pgactive_15-2.1.9-1PGSTY.el10.x86_64.rpm
pgactive_15 2.1.10 el10.aarch64 pigsty 613.5 KiB pgactive_15-2.1.10-1PGSTY.el10.aarch64.rpm
pgactive_15 2.1.9 el10.aarch64 pigsty 611.4 KiB pgactive_15-2.1.9-1PGSTY.el10.aarch64.rpm
postgresql-15-pgactive 2.1.10 d12.x86_64 pigsty 577.1 KiB postgresql-15-pgactive_2.1.10-1PGSTY~bookworm_amd64.deb
postgresql-15-pgactive 2.1.10 d12.aarch64 pigsty 550.5 KiB postgresql-15-pgactive_2.1.10-1PGSTY~bookworm_arm64.deb
postgresql-15-pgactive 2.1.10 d13.x86_64 pigsty 578.8 KiB postgresql-15-pgactive_2.1.10-1PGSTY~trixie_amd64.deb
postgresql-15-pgactive 2.1.10 d13.aarch64 pigsty 553.5 KiB postgresql-15-pgactive_2.1.10-1PGSTY~trixie_arm64.deb
postgresql-15-pgactive 2.1.10 u22.x86_64 pigsty 697.9 KiB postgresql-15-pgactive_2.1.10-1PGSTY~jammy_amd64.deb
postgresql-15-pgactive 2.1.10 u22.aarch64 pigsty 689.2 KiB postgresql-15-pgactive_2.1.10-1PGSTY~jammy_arm64.deb
postgresql-15-pgactive 2.1.10 u24.x86_64 pigsty 609.8 KiB postgresql-15-pgactive_2.1.10-1PGSTY~noble_amd64.deb
postgresql-15-pgactive 2.1.10 u24.aarch64 pigsty 604.2 KiB postgresql-15-pgactive_2.1.10-1PGSTY~noble_arm64.deb
postgresql-15-pgactive 2.1.10 u26.x86_64 pigsty 607.3 KiB postgresql-15-pgactive_2.1.10-1PGSTY~resolute_amd64.deb
postgresql-15-pgactive 2.1.10 u26.aarch64 pigsty 599.0 KiB postgresql-15-pgactive_2.1.10-1PGSTY~resolute_arm64.deb

Source

pig build pkg pgactive;		# build rpm/deb

Install

Make sure PGDG and PIGSTY repo available:

pig repo add pgsql -u   # add both repo and update cache

Install this extension with pig:

pig install pgactive;		# install via package name, for the active PG version

pig install pgactive -v 19;   # install for PG 19
pig install pgactive -v 18;   # install for PG 18
pig install pgactive -v 17;   # install for PG 17
pig install pgactive -v 16;   # install for PG 16
pig install pgactive -v 15;   # install for PG 15

Config this extension to shared_preload_libraries:

shared_preload_libraries = 'pgactive';

Create this extension with:

CREATE EXTENSION pgactive;

Usage

Sources:

pgactive 2.1.10 provides active-active logical replication between databases in a full mesh. Writes commit locally and replicate to peers; applications must handle lag, conflicts and node-local locking rather than assume global serializability.

Configure a group

The release requires PostgreSQL 18.7, 17.12, 16.16, 15.20 or 14.25 and later minors in those branches; it also names upcoming PostgreSQL 19. Preload the library, configure logical WAL and sufficient replication slots/workers, then restart. Installation and management functions require superuser access.

shared_preload_libraries = 'pgactive'
wal_level = logical
CREATE EXTENSION pgactive;
SELECT pgactive.pgactive_create_group(
  node_name := 'node1-app',
  node_dsn := 'user_mapping=postgres pgactive_foreign_server=node1'
);
SELECT pgactive.pgactive_wait_for_node_ready();

The example assumes an existing node1 foreign server using pgactive_fdw, a protected user mapping and working connections to the database itself and every peer. Configure actual credentials through protected mappings or password files. On a fresh joining database, create the extension and use pgactive.pgactive_join_group with its own node_dsn and the peer’s join_using_dsn, then wait for readiness. The built-in join performs coordinated initialization; an arbitrary independent dump does not substitute for it.

Operations and upgrades

Every peer must be reachable when a node joins. Plan unique keys, sequence allocation, conflict handling and replication-slot retention. DDL replication is disabled by default; enabling it requires consistent policy on senders and receivers. Apply workers default to applying DML as the table owner, while replication connections and worker management remain privileged.

Version 2.1.10 hardens replication-name and tuple handling and fixes conflict-handler ABI and shared-memory lock offsets. A 2.1.10 node may join an older group, but a node on 2.1.9 or earlier cannot join a 2.1.10 node until upgraded. Install matching files and execute the supplied SQL upgrade in each database; coordinate restart/reconnection and join order across the group.

表格阅读器