Upgrading rds posgresql engine version fom 10.18 to 11.14

1

The instance could not be upgraded because there are one or more databases with an older version of PostGIS extension or its dependent extensions (address_standardizer, address_standardizer_data_us, postgis_tiger_geocoder, postgis_topology, postgis_raster) installed. Please upgrade all installations of PostGIS and drop its dependent extensions and try again.

I do not have even any postgis extension in use, I was wondering if the problem is having other database instances?. I first upgraded from 9.x to 10.18 and everything worked fine, But now I do not know what else to try. The other instances remain in 9.x. Thanks in advance

asked 2 years ago555 views
1 Answer
0

ok... I did find out how to deal with it... First, you really need to upgrade it in baby steps. This is my writeup

PosgreSQL + PostGIS, from version 9.5 to 13.3

First you need to go to the latest 9.5.25, this can be easily done using a simple AWS CLI modify command in your DB instance. Now update POSTGIS and any other extensions you have to the newest one, if in doubt, look up the newest version.

I made a python script for myself that does update all DBs I have with the extension version I ask.

postgis_version='2.2.5' postgis_topology_version='2.2.5'

Next step, do change your version to 9.6.22, also change the machine the DB is running to something newer, this will help in the next steps (newer DB versions cannot run in older instances).

postgis_version='2.5.2' postgis_topology_version='2.3.7'

Now you may upgrade to version 10.17.

postgis_topology_version='2.5.2'

Once upgrade to version 10.17 is done, you may upgrade to 11.12... I think you can upgrade to 11.12 directly, without the 10.17 stop, but I was in no rush (and it was quick anyway).

At version 11.12, you may now upgrade POSTGIS and any others.

postgis_version='2.5.2next' postgis_topology_version='2.5.2next'

Now you may upgrade to version 11.13, this will enable you to install version POSTGIS at version 3.1.4, allowing you to go up to postgres 13.3

postgis_version='3.1.4' postgis_topology_version='3.1.4'

And you are done. I hope this helps you.

Also, if you have multiple databases in your instance, make sure all of them have the latest extensions before upgrading, and always run SELECT * from pg_available_extension_versions where name='postgis'; to find which are the latest versions of the extensions before updating.

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions