pgactive
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
pgactive | 2.1.7 | ETL | Apache-2.0 | C |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 9560 | pgactive | Yes | Yes | Yes | Yes | No | No | pg_catalog |
| Related | pglogical spock mimeo pgoutput postgres_fdw repmgr pg_failover_slots citus pgautofailover bgw_replstatus |
|---|
require libpgfeutils
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | PIGSTY | 2.1.7 | 1817161514 | pgactive | - |
| RPM | PIGSTY | 2.1.7 | 1817161514 | pgactive_$v | - |
| DEB | PIGSTY | 2.1.7 | 1817161514 | postgresql-$v-pgactive | - |
Build
You can build the RPM / DEB packages for pgactive using pig build:
Install
You can install pgactive 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
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
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
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)