Skip to content

Why did my Amazon RDS for PostgreSQL or Aurora PostgreSQL-Compatible DB instance automatically upgrade?

5 minute read
5

I want to know why my Amazon Relational Database Service (Amazon RDS) for PostgreSQL DB instance or Amazon Aurora PostgreSQL-Compatible DB cluster automatically upgraded. I turned off automatic minor version upgrades.

Resolution

Note: If you receive errors when you run AWS Command Line Interface (AWS CLI) commands, then see Troubleshooting errors for the AWS CLI. Also, make sure that you're using the most recent AWS CLI version.

Identify the cause of the upgrade

If you turn off Auto minor version upgrades, then end-of-support and critical security upgrades still apply. For more information, see Automatic minor version upgrades for RDS for PostgreSQL.

Minor version end-of-standard support

Each minor version has its own end-of-standard support date, independent of its major version. The upgrade stays in the same major version and the maintenance notice or action names the target. For more information, see Release calendars for Amazon RDS for PostgreSQL or Release calendars for Aurora PostgreSQL.

Note: You can't create DB instances with versions marked NO_CREATE in the RDS for PostgreSQL release calendar.

Major version end-of-standard support

After a major version standard support ends, Amazon RDS or Aurora upgrades earlier minor versions to the last minor version released before that date. If you turn on Amazon RDS Extended Support, then resources automatically enroll in the same major version for an extra charge. If you turn off RDS Extended Support, then Amazon RDS automatically upgrades your resources to the next supported major version. When RDS Extended Support ends, resources on the unsupported version automatically upgrade to a supported major version.

For more information about RDS Extended Support for Aurora, see Amazon RDS Extended Support with Amazon Aurora.

Critical security issues

Critical security upgrades can occur outside the end-of-support schedule.

Amazon RDS automatically schedules required security and reliability patching. Certain required maintenance actions take your resource offline.

Note: If you change the maintenance window, you don't prevent a mandatory upgrade. Amazon RDS applies the upgrade after the mandatory apply date.

For more information, see Maintaining a DB instance or Maintaining an Amazon Aurora DB cluster.

Aurora PostgreSQL-Compatible LTS releases

Aurora PostgreSQL-Compatible long-term support (LTS) releases stay on one minor version longer and get critical stability and security patches yearly and as needed. To keep an LTS version for its lifecycle, turn off automatic upgrades on all cluster instances.

Note: Older LTS versions require RDS Extended Support after standard support ends.

Check your current engine version and setting

To check your RDS for PostgreSQL DB instance engine version, run the following describe-db-instances command:

aws rds describe-db-instances \
 --db-instance-identifier yourdbinstance \
 --region aa-example-1 \
 --query 'DBInstances[0].{Engine:Engine,EngineVersion:EngineVersion,AutoMinorVersionUpgrade:AutoMinorVersionUpgrade}'

Note: Replace yourdbinstance with your DB instance and aa-example-1 with your AWS Region.

To check your Aurora PostgreSQL-Compatible DB cluster engine version, run the following describe-db-instances command:

aws rds describe-db-instances \
 --filters Name=db-cluster-id,Values=yourdbcluster \
 --region aa-example-1 \
 --query 'DBInstances[].{DBInstanceIdentifier:DBInstanceIdentifier,EngineVersion:EngineVersion,AutoMinorVersionUpgrade:AutoMinorVersionUpgrade}'

Note: Replace yourdbcluster with your DB cluster and aa-example-1 with your Region.

If AutoMinorVersionUpgrade is false, then this means that routine upgrades are off.

Check the routine RDS for PostgreSQL upgrade target

To find your version's routine upgrade target, run the following describe-db-engine-versions command:

aws rds describe-db-engine-versions \
 --engine postgres \
 --engine-version example-version \
 --region aa-example-1 \
 --query "DBEngineVersions[*].ValidUpgradeTarget[*].{AutoUpgrade:AutoUpgrade,EngineVersion:EngineVersion}" \
 --output table

Note: Replace example-version with your engine version and aa-example-1 with your Region.

The target with AutoUpgrade set to true is the routine target. When you turn on automatic upgrades, Amazon RDS uses this target.

For more information, see Upgrading a DB instance engine version and Performing a minor version upgrade.

Check pending maintenance actions

To check your RDS for PostgreSQL DB instance, run the describe-pending-maintenance-actions AWS CLI command:

aws rds describe-pending-maintenance-actions \
 --filters Name=db-instance-id,Values=mydbinstance \
 --region aa-example-1

Note: Replace mydbinstance with your DB instance and aa-example-1 with your Region.

To check your Aurora PostgreSQL DB cluster, run the describe-pending-maintenance-actions command:

aws rds describe-pending-maintenance-actions \
 --filters Name=db-cluster-id,Values=mydbcluster \
 --region aa-example-1

Note: Replace mydbcluster with your DB cluster and aa-example-1 with your Region.

Review the Action, Description, and apply-date fields. Amazon RDS applies for required actions. You can't defer the actions indefinitely.

Review scheduled changes and events

To review scheduled changes and events, view your AWS Health Dashboard scheduled changes and create RDS event notification subscriptions.

For more information, see Viewing Amazon RDS events and Amazon RDS event categories and event messages for Aurora.

After a major version upgrade, you can review the timestamped RDS for PostgreSQL pg_upgrade_internal.log and pg_upgrade_server.log files.

Prepare for a required upgrade

To prepare for a required update, restore a recent snapshot to a non-production DB instance or cluster. Choose a low-traffic period, and then perform the upgrade. Make sure to schedule the upgrade before the mandatory apply date. Validate the PostgreSQL extensions, queries, drivers, monitoring, backup, and restore.

Monitor RDS events, database logs, application errors, and performance during and after the upgrade.

AWS OFFICIALUpdated 20 days ago
4 Comments

Really helpful.

replied 19 days ago

Insightful

AWS

replied 19 days ago

Very helpful to share with the customer

AWS

replied 19 days ago

This is some good information

replied 19 days ago