[postgis-users] Postgis upgrade from 3.0.0alpha4
Morten Sickel
morten at sickel.net
Thu Oct 7 01:22:28 PDT 2021
I had planned to upgrade a postgresql cluster to postgresql14 on a
CENTOS7 server today, but I have got a postgis-related problem. It
turned out that one of the databases on the server had never been
upgraded from postgis 3.0.0alpha4 and the lowest version of postgis
available for postgis14 is 3.1.
In all cases, the 3.0.0alpha4 should have been upgraded, but with
postgis3.0 installed for the postgresql 12 server, I end up with this
message:
SELECT postgis_extensions_upgrade();
NOTICE: Updating extension postgis from 3.0.0alpha4 to 3.0.4
ERROR: extension "postgis" has no update path from version
"3.0.0alpha4" to version "3.0.4"
CONTEXT: SQL statement "ALTER EXTENSION postgis UPDATE TO "3.0.4";"
PL/pgSQL function postgis_extensions_upgrade() line 59 at EXECUTE
If I try to run the pg_upgrade with this setting, it will fail:
pg_restore: error: could not execute query: ERROR: could not find
function "pgis_geometry_union_transfn" in file
"/usr/pgsql-14/lib/postgis-3.so"
Command was: CREATE FUNCTION
"public"."pgis_geometry_union_transfn"("internal", "public"."geometry")
RETURNS "internal"
LANGUAGE "c" PARALLEL SAFE
AS '$libdir/postgis-3', 'pgis_geometry_union_transfn';
How can I get past this obstacle? If neccesary, I would not mind dumping
the database and manually edit the file, but I would prefer if there
exists a simpler option.
Morten
More information about the postgis-users
mailing list