Reputation: 421
postgres upgrade from 10.9 to 11.4 on aws rds failure with below reason
Database instance is in a state that cannot be upgraded: PreUpgrade checks failed: The instance could not be upgraded because there are one or more databases with an older version of PostGIS installed. Please upgrade all installations of PostGIS and try again.
i have postgis 2.4.4 installed and command
ALTER EXTENSION postgis UPDATE;
fails with message
NOTICE: version "2.4.4" of extension "postgis" is already installed
and command
ALTER EXTENSION postgis UPDATE TO "2.5.1"
fails with this message
extension "postgis" has no update path from version "2.4.4" to version "2.5.1"
Upvotes: 2
Views: 1803
Reputation: 99
It gives you that error because there is no upgrade from 2.4.4 to 2.5.1. You can only move to 2.5.2 as next step.
Refer to this page under section "PostgreSQL version 10.x extensions supported on Amazon RDS".
And similarly if you wanted to go to 3.1.4 from 2.4.4, you must first go to 2.5.2 and then to 3.1.4.
Upvotes: 1
Reputation: 21038
In order to upgrade to version 2.5.* you need to run the following command
ALTER EXTENSION postgis UPDATE TO "2.5.2";
Upvotes: 4