By xcco3x
Checking whether I can upgrade my postgres 17 database to postgres 18, I get this error:
upgrade installed extensions before attempting a major version upgrade
Looking at the extensions I have installed, I have:
Any suggestions on ways forward here? The error itself is somewhat cryptic, so I don’t even know if the issue is the versions of these extensions that are installed.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Heya, @xcco3x
Are you trying this on the managed PostgreSQL database?
https://docs.digitalocean.com/products/databases/postgresql/how-to/upgrade-version/
That error means all extensions must be upgraded to their latest available version on your current Postgres major (17) before a major upgrade is allowed. It’s a pre-check, not a Postgres 18 bug.
plpgsql isn’t the issue. PostGIS is almost certainly the blocker, even if 3.5.0 looks recent. On managed Postgres, there may be a newer PostGIS version available for PG 17 that you haven’t applied yet.
Regards
It may simply be an issue with the managed postgres 18?
Attempted to install postgis on a managed psql18 instance this morning (CREATE EXTENSION postgis;) and received the following error:
ERROR: could not open extension control file "/usr/pgsql-18/share/extension/postgis.control": No such file or directory
Spun up a managed postgres 17 and was able to install the extension with no issue.
Hi there,
That message usually means one of your extensions isn’t on the latest version available for Postgres 17, and PostGIS is almost always the one that blocks major upgrades. I’m not entirely sure about your setup, but you could try updating it in place:
ALTER EXTENSION postgis UPDATE;
and the related ones if you use them.
If that works, the Postgres 18 upgrade should stop complaining. If it doesn’t, it might mean your current PostGIS build isn’t new enough for PG18 and you’d need to install a newer PostGIS version on PG17 first, then update the extension again.
The error isn’t very clear, but in most cases it comes down to PostGIS needing an update before the major version upgrade can proceed.
Also, is this a managed database or a self-hosted on a Droplet?
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.