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.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 spock mimeo pgoutput postgres_fdw repmgr pg_failover_slots citus pgautofailover bgw_replstatus |
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 |
Source
github.com/aws/pgactive
pgactive-2.1.7.tar.gz
Install
Make sure PGDG and PIGSTY repo available:
Install this extension with pig:
Config this extension to shared_preload_libraries:
Create this extension with:
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