Skip to content
pgactive

pgactive

pgactive : Active-Active Replication Extension for PostgreSQL

Overview

ID Extension Package Version Category License Language
9560
pgactive
pgactive
2.1.7
ETL
Apache-2.0
C
Attribute Has Binary Has Library Need Load Has DDL Relocatable Trusted
--sLd--
Yes
Yes
Yes
Yes
no
no
Relationships
Schemas pg_catalog
See Also
pglogical
pg_failover_slots
repmgr
bgw_replstatus
pglogical_origin
pglogical_ticker
pgl_ddl_deploy
decoderbufs

require libpgfeutils

Packages

Type Repo Version PG Major Compatibility Package Pattern Dependencies
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 / PG PG18 PG17 PG16 PG15 PG14
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
Package Version OS ORG SIZE File URL
pgactive_18 2.1.7 el8.x86_64 pigsty 376.1 KiB pgactive_18-2.1.7-1PIGSTY.el8.x86_64.rpm
pgactive_18 2.1.7 el8.aarch64 pigsty 360.5 KiB pgactive_18-2.1.7-1PIGSTY.el8.aarch64.rpm
pgactive_18 2.1.7 el9.x86_64 pigsty 346.6 KiB pgactive_18-2.1.7-1PIGSTY.el9.x86_64.rpm
pgactive_18 2.1.7 el9.aarch64 pigsty 338.0 KiB pgactive_18-2.1.7-1PIGSTY.el9.aarch64.rpm
pgactive_18 2.1.7 el10.x86_64 pigsty 350.7 KiB pgactive_18-2.1.7-1PIGSTY.el10.x86_64.rpm
pgactive_18 2.1.7 el10.aarch64 pigsty 343.5 KiB pgactive_18-2.1.7-1PIGSTY.el10.aarch64.rpm
postgresql-18-pgactive 2.1.7 d12.x86_64 pigsty 593.1 KiB postgresql-18-pgactive_2.1.7-1PIGSTY~bookworm_amd64.deb
postgresql-18-pgactive 2.1.7 d12.aarch64 pigsty 567.2 KiB postgresql-18-pgactive_2.1.7-1PIGSTY~bookworm_arm64.deb
postgresql-18-pgactive 2.1.7 d13.x86_64 pigsty 594.5 KiB postgresql-18-pgactive_2.1.7-1PIGSTY~trixie_amd64.deb
postgresql-18-pgactive 2.1.7 d13.aarch64 pigsty 570.9 KiB postgresql-18-pgactive_2.1.7-1PIGSTY~trixie_arm64.deb
postgresql-18-pgactive 2.1.7 u22.x86_64 pigsty 644.8 KiB postgresql-18-pgactive_2.1.7-1PIGSTY~jammy_amd64.deb
postgresql-18-pgactive 2.1.7 u22.aarch64 pigsty 634.6 KiB postgresql-18-pgactive_2.1.7-1PIGSTY~jammy_arm64.deb
postgresql-18-pgactive 2.1.7 u24.x86_64 pigsty 625.7 KiB postgresql-18-pgactive_2.1.7-1PIGSTY~noble_amd64.deb
postgresql-18-pgactive 2.1.7 u24.aarch64 pigsty 619.6 KiB postgresql-18-pgactive_2.1.7-1PIGSTY~noble_arm64.deb
postgresql-18-pgactive 2.1.7 u26.x86_64 pigsty 622.5 KiB postgresql-18-pgactive_2.1.7-1PIGSTY~resolute_amd64.deb
postgresql-18-pgactive 2.1.7 u26.aarch64 pigsty 614.0 KiB postgresql-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