- Newest
- Most votes
- Most comments
Given your situation with Aurora PostgreSQL 10.21, which is a deprecated engine version, and the various issues you're encountering, upgrading to a newer version is indeed necessary. However, the problems you're facing indicate that a direct in-place upgrade might not be possible due to compatibility issues, possibly related to your PostGIS extension or other database settings.
Here are the recommended steps to address your situation:
-
Investigate the precheck log: Unfortunately, the precheck log file for Aurora PostgreSQL is not directly accessible to customers. You would need to contact AWS Support to get more details about the specific incompatibilities preventing the upgrade.
-
Extension compatibility: Your PostGIS extension (version 2.4.4) is quite old and may not be compatible with newer PostgreSQL versions. Before upgrading, you'll need to ensure all extensions are compatible with the target version.
-
Dump and restore approach: Given the complications you're facing, the most reliable method would be to perform a logical dump of your existing database and restore it to a new Aurora PostgreSQL instance with a more recent engine version. This approach, while more involved, allows you to:
- Start with a clean, up-to-date instance
- Avoid issues related to in-place upgrades
- Upgrade extensions during the process
Here's a high-level overview of the process:
a. Create a logical dump of your current database using pg_dump. b. Launch a new Aurora PostgreSQL cluster with the desired engine version (e.g., 14.9 or 15.4). c. Restore the dump to the new cluster. d. Update extensions to versions compatible with the new PostgreSQL version. e. Test your application thoroughly with the new database. f. Update your application's database configuration to point to the new cluster.
-
Consider Aurora PostgreSQL Serverless v2: If your workload is intermittent or unpredictable, you might want to consider using Aurora PostgreSQL Serverless v2, which can automatically scale and pause based on usage.
-
Regular maintenance: Once you've upgraded, make sure to keep your database updated regularly to avoid similar situations in the future. Enable auto minor version upgrades and plan for major version upgrades periodically.
While manually dumping and restoring to a new instance requires more effort, it's often the most reliable way to upgrade from a significantly outdated version, especially when direct upgrades are failing. This approach also gives you the opportunity to start fresh with the latest engine version and compatible extensions.
Sources
Performing a minor version upgrade - Amazon Aurora
Performing a major version upgrade - Amazon Aurora
Using logical replication to perform a major version upgrade for Aurora PostgreSQL - Amazon Aurora
Relevant content
- asked 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 months ago
- AWS OFFICIALUpdated 24 days ago