Upgrading and Testing Rollback of a Multi-TB Amazon Aurora PostgreSQL Database Using Blue-Green Deployment
Managing upgrades for large, mission-critical databases is one of the most challenging tasks for DBAs and cloud architects. When dealing with multi-terabyte Amazon Aurora PostgreSQL databases, complexity multiplies—requiring meticulous planning, robust strategies, and proven best practices to ensure minimal downtime and zero data loss.
In this PGConf NYC 2023 session, Shailesh Rangani, Director and Global Practice Lead for PostgreSQL Services at Datavail, shares a comprehensive roadmap for upgrading large Aurora PostgreSQL clusters from older versions (such as PG11) to newer versions (like PG15) using Blue-Green Deployment methodology. This approach enables near-zero downtime upgrades and provides a seamless rollback mechanism in case of unexpected issues.
The presentation covers:
Major Upgrade Options for Aurora PostgreSQL, including Import/Export, In-Place upgrades, and Logical Replication.
Blue-Green Deployment Architecture: How to set up parallel environments (Blue for current version, Green for future version) and switch roles safely.
Aurora Fast Database Cloning: Leveraging Amazon Aurora’s rapid cloning feature to create target environments quickly.
Step-by-Step Upgrade Process:
Preparing the source database (logical replication setup, WAL cache configuration, validating primary keys and sequences).
Creating publications and replication slots.
Cloning and preparing the target database.
Performing optional maintenance tasks like VACUUM FULL, REINDEX, and ANALYZE.
Upgrading clusters from PG11 to PG15 and validating the upgrade.
Setting up replication between old and new clusters.
Cutover and Rollback Strategies:
Switching roles between Blue and Green environments.
Validating replication lag and resetting sequences.
Breaking replication and updating DNS endpoints.
Implementing rollback procedures to revert if needed.
Observability and Alerting: Monitoring schema changes, replication slot status, replication lag, and CloudWatch metrics.
Real-World Use Cases: Minor and major upgrades, maintenance tasks, schema changes, and application deployments.
Packed with actionable insights, best practices, and lessons learned from real-world implementations, this guide helps DBAs, DevOps engineers, and cloud architects confidently plan and execute large-scale PostgreSQL upgrades on AWS Aurora with minimal risk.
About the Speaker
Shailesh Rangani brings over 18 years of experience in database technologies and holds certifications across AWS, Azure, OCI, Oracle, PostgreSQL, MongoDB, and Db2 LUW.
👉 Download the full presentation here:
https://www.datavail.com/resources/upgrading-and-testing-rollback/