Skip to content
pgactive

pgactive

pgactive : Active-Active Replication Extension for PostgreSQL

Overview

IDExtensionPackageVersionCategoryLicenseLanguage
9560
pgactive
pgactive
2.1.7
ETL
Apache-2.0
C
AttributeHas BinaryHas LibraryNeed LoadHas DDLRelocatableTrusted
--sLd--
Yes
Yes
Yes
Yes
no
no
Relationships
Schemaspg_catalog
See Also
pglogical
pg_failover_slots
repmgr
bgw_replstatus
pglogical_origin
pglogical_ticker
pgl_ddl_deploy
decoderbufs

require libpgfeutils

Packages

TypeRepoVersionPG Major CompatibilityPackage PatternDependencies
EXT
PIGSTY
2.1.7
18
17
16
15
14
pgactive-
RPM
PIGSTY
2.1.7
18
17
16
15
14
pgactive_$v-
DEB
PIGSTY
2.1.7
18
17
16
15
14
postgresql-$v-pgactive-
Linux / PGPG18PG17PG16PG15PG14
el8.x86_64
PIGSTY 2.1.7
PIGSTY 2.1.7
PIGSTY 2.1.7
PIGSTY 2.1.7
PIGSTY 2.1.7
el8.aarch64
PIGSTY 2.1.7
PIGSTY 2.1.7
PIGSTY 2.1.7
PIGSTY 2.1.7
PIGSTY 2.1.7
el9.x86_64
PIGSTY 2.1.7
PIGSTY 2.1.7
PIGSTY 2.1.7
PIGSTY 2.1.7
PIGSTY 2.1.7
el9.aarch64
PIGSTY 2.1.7
PIGSTY 2.1.7
PIGSTY 2.1.7
PIGSTY 2.1.7
PIGSTY 2.1.7
el10.x86_64
PIGSTY 2.1.7
PIGSTY 2.1.7
PIGSTY 2.1.7
PIGSTY 2.1.7
PIGSTY 2.1.7
el10.aarch64
PIGSTY 2.1.7
PIGSTY 2.1.7
PIGSTY 2.1.7
PIGSTY 2.1.7
PIGSTY 2.1.7
d12.x86_64
PIGSTY 2.1.7
PIGSTY 2.1.7
PIGSTY 2.1.7
PIGSTY 2.1.7
PIGSTY 2.1.7
d12.aarch64
PIGSTY 2.1.7
PIGSTY 2.1.7
PIGSTY 2.1.7
PIGSTY 2.1.7
PIGSTY 2.1.7
d13.x86_64
PIGSTY 2.1.7
PIGSTY 2.1.7
PIGSTY 2.1.7
PIGSTY 2.1.7
PIGSTY 2.1.7
d13.aarch64
PIGSTY 2.1.7
PIGSTY 2.1.7
PIGSTY 2.1.7
PIGSTY 2.1.7
PIGSTY 2.1.7
u22.x86_64
PIGSTY 2.1.7
PIGSTY 2.1.7
PIGSTY 2.1.7
PIGSTY 2.1.7
PIGSTY 2.1.7
u22.aarch64
PIGSTY 2.1.7
PIGSTY 2.1.7
PIGSTY 2.1.7
PIGSTY 2.1.7
PIGSTY 2.1.7
u24.x86_64
PIGSTY 2.1.7
PIGSTY 2.1.7
PIGSTY 2.1.7
PIGSTY 2.1.7
PIGSTY 2.1.7
u24.aarch64
PIGSTY 2.1.7
PIGSTY 2.1.7
PIGSTY 2.1.7
PIGSTY 2.1.7
PIGSTY 2.1.7
u26.x86_64
PIGSTY 2.1.7
PIGSTY 2.1.7
PIGSTY 2.1.7
PIGSTY 2.1.7
PIGSTY 2.1.7
u26.aarch64
PIGSTY 2.1.7
PIGSTY 2.1.7
PIGSTY 2.1.7
PIGSTY 2.1.7
PIGSTY 2.1.7
PackageVersionOSORGSIZEFile URL
pgactive_182.1.7el8.x86_64pigsty376.1 KiBpgactive_18-2.1.7-1PIGSTY.el8.x86_64.rpm
pgactive_182.1.7el8.aarch64pigsty360.5 KiBpgactive_18-2.1.7-1PIGSTY.el8.aarch64.rpm
pgactive_182.1.7el9.x86_64pigsty346.6 KiBpgactive_18-2.1.7-1PIGSTY.el9.x86_64.rpm
pgactive_182.1.7el9.aarch64pigsty338.0 KiBpgactive_18-2.1.7-1PIGSTY.el9.aarch64.rpm
pgactive_182.1.7el10.x86_64pigsty350.7 KiBpgactive_18-2.1.7-1PIGSTY.el10.x86_64.rpm
pgactive_182.1.7el10.aarch64pigsty343.5 KiBpgactive_18-2.1.7-1PIGSTY.el10.aarch64.rpm
postgresql-18-pgactive2.1.7d12.x86_64pigsty593.1 KiBpostgresql-18-pgactive_2.1.7-1PIGSTY~bookworm_amd64.deb
postgresql-18-pgactive2.1.7d12.aarch64pigsty567.2 KiBpostgresql-18-pgactive_2.1.7-1PIGSTY~bookworm_arm64.deb
postgresql-18-pgactive2.1.7d13.x86_64pigsty594.5 KiBpostgresql-18-pgactive_2.1.7-1PIGSTY~trixie_amd64.deb
postgresql-18-pgactive2.1.7d13.aarch64pigsty570.9 KiBpostgresql-18-pgactive_2.1.7-1PIGSTY~trixie_arm64.deb
postgresql-18-pgactive2.1.7u22.x86_64pigsty644.8 KiBpostgresql-18-pgactive_2.1.7-1PIGSTY~jammy_amd64.deb
postgresql-18-pgactive2.1.7u22.aarch64pigsty634.6 KiBpostgresql-18-pgactive_2.1.7-1PIGSTY~jammy_arm64.deb
postgresql-18-pgactive2.1.7u24.x86_64pigsty625.7 KiBpostgresql-18-pgactive_2.1.7-1PIGSTY~noble_amd64.deb
postgresql-18-pgactive2.1.7u24.aarch64pigsty619.6 KiBpostgresql-18-pgactive_2.1.7-1PIGSTY~noble_arm64.deb
postgresql-18-pgactive2.1.7u26.x86_64pigsty622.5 KiBpostgresql-18-pgactive_2.1.7-1PIGSTY~resolute_amd64.deb
postgresql-18-pgactive2.1.7u26.aarch64pigsty614.0 KiBpostgresql-18-pgactive_2.1.7-1PIGSTY~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 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
pig install pgactive -v 14;   # install for PG 14

Config this extension to shared_preload_libraries:

shared_preload_libraries = 'pgactive';

Create this extension with:

CREATE EXTENSION pgactive;

Usage

pgactive: Active-Active Replication Extension for PostgreSQL

The pgactive extension provides active-active (multi-master) replication for PostgreSQL, where multiple database instances can accept writes and replicate changes to each other.

Enabling

CREATE EXTENSION pgactive;

Overview

pgactive enables active-active replication using logical replication as its foundation. Multiple databases in a cluster can accept changes and replicate them bidirectionally.

Key Concepts

  • Active-Active: All nodes accept reads and writes simultaneously
  • Asynchronous: Changes are replicated asynchronously between nodes
  • Conflict Resolution: Applications must handle conflicting changes from multiple writers
  • Logical Replication: Uses PostgreSQL’s logical decoding to interpret and apply changes

Use Cases

  • Multi-region high availability database clusters
  • Reducing write latency between applications and databases
  • Blue/green application updates
  • Data migration between systems that must both remain writable

Design Considerations

Applications using pgactive must be designed to handle:

  • Write conflicts: Concurrent modifications to the same row on different nodes
  • Replication lag: Changes may not be immediately visible on all nodes
  • Feature limitations: Some features like auto-incrementing sequences require special handling across nodes

Notes

  • Built on PostgreSQL’s native logical replication infrastructure
  • Requires PostgreSQL 10+ (native logical replication support)
  • Refer to the project documentation for detailed setup and conflict resolution strategies
Last updated on