We use machine learning technology to do auto-translation. Click "English" on top navigation bar to check Chinese version.
Perform Amazon Aurora PostgreSQL minor version upgrades with minimal downtime via minor version update improvements
When using
In this post, we discuss a series of improvements to the minor version update process that allow for reduced downtime and fewer disruptions to your workloads.
Use case
According to the
When critical security patches are needed for a PostgreSQL version, those updates are made available as soon as possible after released by the PostgreSQL Global Development Group, often within hours of release. Additionally, when minor version updates are released, there is currently no means to identify if a minor version update will result in instance reboot (though a reboot is not always needed). When applying minor version updates, it’s safe to assume that the update will require a reboot in order to fully apply it to the cluster.
Before the improvements to the Amazon Aurora PostgreSQL minor version update process, reboots resulting from minor version updates caused connections to the rebooting compute instance to be lost, which is the current default behavior for open-source PostgreSQL. The updated behavior (applying to older Amazon Aurora PostgreSQL-Compatible Edition version releases) results in a database restart consistent with the open-source PostgreSQL experience, requiring more time for the database compute instances to be brought back online.
Minor version update improvements
The minor version update improvements for Amazon Aurora PostgreSQL-Compatible Edition provide a number of improvements to the update process. The primary benefits these improvements provide include preservation database and file system metadata, which allows for a faster database restart as part of the update process. Previously existing database sessions can now be restored to your cluster’s read/write instance, minimizing much of the downtime related to applying minor version updates. Additionally, existing connections to the cluster read/write instance are preserved. In testing the upgrade process from Aurora PostgreSQL v 11.17 -> v11.18 (pre-improvement) to 11.18 -> 11.19 (with improvements), the following observations were made:
Aurora Minor version update improvements benchmarked | |||
Aurora PG Version | Loss of writer connectivity | Writer connectivity returns | Writer instance unavailability |
11.9 -> 11.13 | 18:53:52.062996 | 18:54:10.314688 | 16.15 seconds |
11.17 -> 11.19 | 19:45:10 | 19:45:10 | Less then 1 second |
Testing with the above versions, a total reduction in writer instance downtime of 15.15 seconds was observed.
Limitations
Although the zero-downtime patching for Amazon Aurora PostgreSQL-Compatible Edition reduces the overall amount of downtime involved in applying minor version updates, this update process still requires a small period of downtime. The length of the downtime may vary depending the individual cluster or instance size. Additionally, this enhancement only applies to Amazon Aurora PostgreSQL-Compatible Edition read/write endpoints and not to all compute instances in the cluster.
Conclusion
Enhancements to Amazon Aurora PostgreSQL-Compatible Edition minor version updates through zero downtime patching result in a lower overall impact to your workloads while still allowing you to easily apply minor version updates (now with less downtime). These enhancements are available in all minor version updates of Amazon Aurora PostgreSQL-Compatible Edition as of
If you have questions, comments, or suggestions on the content covered in this post, leave them in the comments section.
About the Author
Peter Celentano is a Senior Specialist Solutions Architect with Amazon Web Services, focusing on managed PostgreSQL. He works with Amazon Web Services customers to design scalable, secure, performant, and robust database architectures on the cloud.
The mentioned AWS GenAI Services service names relating to generative AI are only available or previewed in the Global Regions. Amazon Web Services China promotes AWS GenAI Services relating to generative AI solely for China-to-global business purposes and/or advanced technology introduction.