pgactive enables rolling major version upgrades for Amazon RDS for PostgreSQL, allowing for a smoother transition with reduced impact on applications. Amazon RDS supports both minor and major version upgrades, with minor upgrades being backward-compatible and major upgrades introducing non-backward-compatible features. Downtime during minor upgrades can be minimized using Amazon RDS Proxy or PgBouncer. For major upgrades, a blue/green deployment option is available, which involves provisioning a new DB instance and validating the upgrade.
The pgactive extension allows for active-active replication, enabling all nodes to handle read and write operations simultaneously. It includes features like conflict detection and resolution. Key benefits of using pgactive for database upgrades include multi-tenant support, minimal downtime, and seamless rollback capabilities.
To perform a major version upgrade using pgactive, the process involves setting up source and target databases, configuring pgactive parameters, and verifying data replication. Specific commands are provided for creating and modifying databases, setting up user mappings, and initializing the replication group.
Limitations of pgactive include handling sequences, materialized views, DDL replication, existing logical replication, and tables without primary keys. Monitoring replication lag is crucial for diagnosing potential issues, and alerts should be set up for active status and pending WAL files. In case of a rollback, the application can be pointed back to the old primary database. After the upgrade, resources should be cleaned up to avoid incurring charges.