Opened 3 months ago

Closed 3 months ago

Last modified 3 months ago

#5768 closed defect (invalid)

PostGIS_Extensions_Upgrade() with this code https://gitlab.com/larsop/postgis

Reported by: Lars Aksel Opsahl Owned by: pramsey
Priority: medium Milestone: PostGIS 3.5.0
Component: postgis Version: 3.4.x
Keywords: Cc:

Description (last modified by strk)

After installing PostGIS_Full_Version reports this

SELECT PostGIS_Full_Version();
                                                                                                                                                    postgis_full_version                                                                                                                                                    
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 POSTGIS="3.5.0dev 3.4.0rc1-1272-g80806376a" [EXTENSION] PGSQL="140" GEOS="3.12.1-CAPI-1.18.1" PROJ="9.3.0" LIBXML="2.9.13" LIBPROTOBUF="1.3.3" WAGYU="0.5.0 (Internal)" (core procs from "3.5.0dev 3.4.0rc1-1109-g88f11a406" need upgrade) TOPOLOGY (topology procs from "3.5.0dev 3.4.0rc1-1109-g88f11a406" need upgrade)
(1 row)

I then upgrade and I get this error

SELECT PostGIS_Extensions_Upgrade();

NOTICE:  00000: Updating extension postgis 3.5.0dev
LOCATION:  exec_stmt_raise, pl_exec.c:3869
ERROR:  42883: could not find function "ST_RemoveIrrelevantPointsForView" in file "/usr/lib/postgresql/14/lib/postgis-3.so"
CONTEXT:  SQL statement "ALTER EXTENSION postgis UPDATE TO "ANY";ALTER EXTENSION postgis UPDATE TO "3.5.0dev""
PL/pgSQL function postgis_extensions_upgrade(text) line 88 at EXECUTE
LOCATION:  load_external_function, dfmgr.c:129

I found when testing https://trac.osgeo.org/postgis/ticket/5766

Change History (3)

comment:1 by strk, 3 months ago

Description: modified (diff)

What does this return ?

nm `pg_config --pkglibdir`/postgis-3.so | grep Remove

The signature should be in the .so file since eeb490ce1d4a38f0f19da88aa0569692c8a31b34 — did you re-run ./configure after update ? Did make check succeed ?

in reply to:  1 comment:2 by Lars Aksel Opsahl, 3 months ago

Resolution: invalid
Status: newclosed

Replying to strk:

What does this return ?

nm `pg_config --pkglibdir`/postgis-3.so | grep Remove
lop@cpu11:/pg_build_from_source/gitlab_com_larsop/postgis$ nm `pg_config --pkglibdir`/postgis-3.so | grep Remove
00000000000329f0 T ST_RemoveRepeatedPoints
00000000000329e0 T pg_finfo_ST_RemoveRepeatedPoints

The signature should be in the .so file since eeb490ce1d4a38f0f19da88aa0569692c8a31b34 — did you re-run ./configure after update ? Did make check succeed ?

Seems like I did not do that and when I did the upgrade worked ok.

postgis_extensions_upgrade                               
---------------------------------------------------------------------------------------
 Upgrade to version 3.5.0dev completed, run SELECT postgis_full_version(); for details
(1 row)

comment:3 by Lars Aksel Opsahl, 3 months ago

Tested on another database with the same postgis version but postgresql 12 and where have also installed postgis_sfcgal. I have different databases on this server the database where postgis_sfcgal was not installed the upgrade wen OK.

When postgis_sfcgal is installed I see this problem

SELECT PostGIS_Extensions_Upgrade();
NOTICE:  00000: Updating extension postgis 3.4.0
LOCATION:  exec_stmt_raise, pl_exec.c:3862
NOTICE:  00000: Updating extension postgis_sfcgal ANY
LOCATION:  exec_stmt_raise, pl_exec.c:3862
NOTICE:  00000: version "ANY" of extension "postgis_sfcgal" is already installed
LOCATION:  ExecAlterExtensionStmt, extension.c:3002
ERROR:  22023: extension "postgis_sfcgal" has no update path from version "ANY" to version "3.5.0dev"
CONTEXT:  SQL statement "ALTER EXTENSION postgis_sfcgal UPDATE TO "ANY";ALTER EXTENSION postgis_sfcgal UPDATE TO "3.5.0dev""
PL/pgSQL function postgis_extensions_upgrade(text) line 88 at EXECUTE
LOCATION:  identify_update_path, extension.c:1111
vroom5.int.nibio.no postgres@sl=# SELECT PostGIS_Full_Version();
                                                                                                                                                                                                                        postgis_full_version                                                                                                                                                                                                                        
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 POSTGIS="3.5.0dev 3.4.0rc1-1272-g80806376a" [EXTENSION] PGSQL="120" GEOS="3.12.1-CAPI-1.18.1" SFCGAL="1.3.7" PROJ="8.2.0" GDAL="GDAL 3.4.3, released 2022/04/22" LIBXML="2.9.10" LIBJSON="0.13.1" LIBPROTOBUF="1.3.3" WAGYU="0.5.0 (Internal)" (core procs from "3.4.0 0874ea3" need upgrade) TOPOLOGY (topology procs from "3.4.0 0874ea3" need upgrade) RASTER (raster procs from "3.4.0 0874ea3" need upgrade) (sfcgal procs from "3.4.0 0874ea3" need upgrade)
(1 row)

I also tested

ALTER EXTENSION postgis_sfcgal UPDATE TO "ANY";
ALTER EXTENSION postgis_sfcgal UPDATE TO "3.5.0dev";

Then I got the same error

ALTER EXTENSION postgis_sfcgal UPDATE TO "ANY";
NOTICE:  00000: version "ANY" of extension "postgis_sfcgal" is already installed
LOCATION:  ExecAlterExtensionStmt, extension.c:3002
ALTER EXTENSION

ALTER EXTENSION postgis_sfcgal UPDATE TO "3.5.0dev";
ERROR:  22023: extension "postgis_sfcgal" has no update path from version "ANY" to version "3.5.0dev"
LOCATION:  identify_update_path, extension.c:1111

A new error to report or a user error ?

Last edited 3 months ago by Lars Aksel Opsahl (previous) (diff)
Note: See TracTickets for help on using tickets.