[postgis-users] ERROR: extension "postgis" has no update path from version "3.2.1" to version "3.2.0"

1,121 views
Skip to first unread message

Bo Guo

unread,
Sep 4, 2023, 7:40:02 PM9/4/23
to PostGIS Users Discussion
Hi all,

I do not know how it happened, but after I upgraded from Postgresql 13- 14, I had a problem updating extensions, including postgis by using:

ALTER EXTENSION "postgis" UPDATE;

Here is the version info:

SELECT version();
PostgreSQL 14.9 (Ubuntu 14.9-0ubuntu0.22.04.1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, 64-bit

SELECT postgis_full_version();
POSTGIS="3.2.0 c3e3cc0" [EXTENSION] PGSQL="130" (procs need upgrade for use with PostgreSQL "140") GEOS="3.10.2-CAPI-1.16.0" PROJ="8.2.1" LIBXML="2.9.12" LIBJSON="0.15" LIBPROTOBUF="1.3.3" WAGYU="0.5.0 (Internal)" (core procs from "3.2.1 5fae8e5" need upgrade) TOPOLOGY (topology procs from "3.2.1 5fae8e5" need upgrade)

I really appreciate any help you can provide.

Bo


Bo Guo, PhD, PE
President

2820 S Alma School Rd #18-671, Chandler, AZ 85286

Regina Obe

unread,
Sep 4, 2023, 8:06:28 PM9/4/23
to PostGIS Users Discussion

Bo,

 

At a glance, it looks like maybe your PostgreSQL 13 had a 3.2.1 installed and your PostgreSQL 14 has 3.2.0 installed (or at least the postgis.control file probably has 3.2.0 instead of 3.2.1).

I’d double check to make sure you did install 3.2.1 on your PostgreSQL 14.  Downgrades are not supported which is essentially what it’s telling you.

 

 

That said, the preferable way for upgrading PostGIS 3 is to use:

 

SELECT postgis_extensions_upgrade();

 

Though that will probably result in the same error since it seems your PostgreSQL 14 is running with 3.2.0 instead of 3.2.1.

 

The ALTER EXTENSION approach has a couple of downsides, that postgis_extensions_upgrade can handle

 

  1. It will only update postgis and not your other extensions like for example your postgis_topology.  Postgis_extensions_upgrade()  will upgrade any postgis_ extension.
  2. If you are moving from a PostgreSQL major to another PostgreSQL major on same version, you still need to upgrade, but because  ALTER EXTENSION relies on a version bump, it won’t be able to upgrade.

 

If you still see a mismatch after please let us know.  I know we’ve made improvements in postgis_extensions_upgrade so 3.2.0 might not have all the new features.

 

Thanks,

Regina

Bo Guo

unread,
Sep 5, 2023, 8:52:55 AM9/5/23
to PostGIS Users Discussion
Hi, Regina!

I do not know why the new stall Postgresql 14 with Postgis-3 on the newly built Ubuntu server 22.04 would have Postgis 3.2.0.  This was the command I used for the postgis install:
   sudo apt install postgresql-14-postgis-3

I went to the postgis folder (/usr/share/postgresql/14/extension) but could ONLY see files with version of 3.2.0 and lower.  So it appeared that the installation did not bring postgis to the 3.2.1 or above.  Please let me know alternative ways to install higher version.

Cheers,

Bo


_______________________________________________
postgis-users mailing list
postgi...@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/postgis-users

Regina Obe

unread,
Sep 5, 2023, 9:22:00 AM9/5/23
to PostGIS Users Discussion

Where did you get your ubuntu package.  Usually I get from apt.postgresql.org but I think for 14 the default for that is newer than 3.2 and even then 3.2.0 and 3.2.1 are very old micros.

Latest micro for PostGIS 3.2 is postgis-3.2.5.

 

Did you run :

 

apt update && apt upgrade

 

before installing?

 

If that doesn’t help then it’s a packaging issue that you should talk with your packager group about.

Bo Guo

unread,
Sep 5, 2023, 10:00:20 AM9/5/23
to PostGIS Users Discussion
Hi, Regina!  I solved the problem.

It turned out I missed the step of "Adds pgdg keys and main repo" as referenced in https://trac.osgeo.org/postgis/wiki/UsersWikiPostGIS3UbuntuPGSQLApt 

Thank you again!

Bo

Gandalf the Gray

unread,
Sep 6, 2023, 6:37:50 AM9/6/23
to PostGIS Users Discussion
Hi guys

Sorry to hijack this thread a bit, but my question is very similar.

Is it possible to use PostGIS from the postgresql apt repo, while using gdal etc (for qgis and grass) from ubuntugis-unstable ppa?

Pieter

Regina Obe

unread,
Sep 6, 2023, 10:56:20 AM9/6/23
to PostGIS Users Discussion

No.  Well not advisable.  People have run into a lot of issues, primarily around PROJ dependency.

The other reason why you might not want to is because most PostGIS dependency checks are done at runtime.

This isn’t an issue for GDAL so much, but more for GEOS.

 

So even though UbuntuGIS generally ships with a newer GEOS than main ubuntu repos, just because it says say GEOS 3.11, PostGIS will still only allow you to use functions allowed for the GEOS that apt postgresql org was compiled with.

Bo Guo

unread,
Sep 7, 2023, 4:52:26 PM9/7/23
to PostGIS Users Discussion
Hi there,

I am trying to get all three environments to have the same version of Postgis.  

Could someone on the list provide any advice on how I may update the WAGYU core procs on one of the servers to match with the rest?

I appreciate your help!

Cheers,

Bo  

Regina Obe

unread,
Sep 8, 2023, 1:27:04 AM9/8/23
to PostGIS Users Discussion

I don’t think the complain is about WAGYU. That version info just happens to sit next to the message.

 

Have you tried doing

 

SELECT postgis_extensions_upgrade();

 

Already and what does it say?

 

From: postgis-users <postgis-us...@lists.osgeo.org> On Behalf Of Bo Guo
Sent: Thursday, September 7, 2023 4:52 PM
To: PostGIS Users Discussion <postgi...@lists.osgeo.org>

Bo Guo

unread,
Sep 8, 2023, 10:14:28 AM9/8/23
to PostGIS Users Discussion
Hi Regina,

Doing "SELECT postgis_extensions_upgrade()" brought all servers on the same Postgis version!

Thanks!

Bo

_______________________________________________
Reply all
Reply to author
Forward
0 new messages