Opened 5 years ago

Closed 5 years ago

#4516 closed defect (fixed)

Upgrade from 2.4 to 3.0

Reported by: robe Owned by: pramsey
Priority: blocker Milestone: PostGIS 3.0.0
Component: build Version: 2.5.x -- EOL
Keywords: Cc:

Description

This person was upgrading using scripts instead of extensions so not sure if its an issue as well upgrading using extensions

Excerpt from https://lists.osgeo.org/pipermail/postgis-devel/2019-September/028098.html


Yes, we use legacy functions; we haven't switched to using 'CREATE EXTENSION' yet (I don't think we can install legacy stuff that way, so it seems not useful to install postgis one way and its legacy functions another way).

It occured to me that possible I should've rerun "postgis_upgrade.sql" with the latest 2.4 RPM before upgrading to 3.0. But I think we *have* the latest 2.4 RPM (from PGDG), and I'd have to think about whether the pacakge would've ever been updated since it was first installed. So I think that probably isn't a solution, for us at least.

I pulled the errors out of logs, sorry for not saving the the first time.

-[ RECORD 2 ]----------------------------------------------------------------------------------------------------
log_time | 2019-09-27 10:10:08.243-06
left     | cannot change name of input parameter "geom1"
detail   | 
query    | CREATE OR REPLACE FUNCTION _ST_LineCrossingDirection(line1 geometry, line2 geometry)                  +
         |         RETURNS integer                                                                               +
         |         AS '$libdir/postgis-3', 'ST_LineCrossingDirection'                                            +
         |         LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE                                                   +
         |         COST 10;
-[ RECORD 3 ]----------------------------------------------------------------------------------------------------
log_time | 2019-09-27 10:10:27.438-06
left     | cannot change name of input parameter "geometrya"
detail   | 
query    | CREATE OR REPLACE FUNCTION _ST_OrderingEquals(geom1 geometry, geom2 geometry)                         +
         |         RETURNS boolean                                                                               +
         |         AS '$libdir/postgis-3', 'LWGEOM_same'                                                         +
         |         LANGUAGE 'c' IMMUTABLE STRICT  PARALLEL SAFE                                                  +
         |         COST 10;

[... eliding my own errors here...]

-[ RECORD 5 ]----------------------------------------------------------------------------------------------------
log_time | 2019-09-27 10:10:42.418-06
left     | cannot change name of input parameter "geom1"
detail   |
query    | CREATE OR REPLACE FUNCTION ST_LineCrossingDirection(line1 geometry, line2 geometry)                   +
         |         RETURNS integer AS                                                                            +
         |         $$ SELECT CASE WHEN NOT $1 OPERATOR(&&) $2 THEN 0 ELSE _ST_LineCrossingDirection($1,$2) END $$+
         |         LANGUAGE 'sql' IMMUTABLE PARALLEL SAFE;
-[ RECORD 6 ]----------------------------------------------------------------------------------------------------
log_time | 2019-09-27 10:10:58.199-06
left     | cannot drop function st_combine_bbox(box3d,geometry) because other objects depend on it
detail   | function st_extent3d(geometry) depends on function st_combine_bbox(box3d,geometry)                    +
         | function extent(geometry) depends on function st_combine_bbox(box3d,geometry)
query    | DROP FUNCTION IF EXISTS st_combine_bbox(box3d, geometry);
-[ RECORD 7 ]----------------------------------------------------------------------------------------------------
log_time | 2019-09-27 10:11:14.194-06
left     | cannot drop function st_combine_bbox(box3d,geometry) because other objects depend on it
detail   | function st_extent3d(geometry) depends on function st_combine_bbox(box3d,geometry)                    +
         | function extent(geometry) depends on function st_combine_bbox(box3d,geometry)
query    | DROP FUNCTION st_combine_bbox(box3d,geometry);

[... eliding my own errors here...]

-[ RECORD 9 ]----------------------------------------------------------------------------------------------------
log_time | 2019-09-27 10:11:34.634-06
left     | cannot drop function st_combine_bbox(box3d,geometry) because other objects depend on it
detail   | function extent(geometry) depends on function st_combine_bbox(box3d,geometry)
query    | DROP FUNCTION IF EXISTS st_combine_bbox(box3d, geometry);
-[ RECORD 10 ]---------------------------------------------------------------------------------------------------
log_time | 2019-09-27 10:12:34.127-06
left     | function "extent3d" already exists with same argument types
detail   |
query    | CREATE AGGREGATE Extent3d(                                                                            +
         |         sfunc = combine_bbox,                                                                         +
         |         basetype = geometry,                                                                          +
         |         stype = box3d                                                                                 +
         |         );
-[ RECORD 11 ]---------------------------------------------------------------------------------------------------
log_time | 2019-09-27 10:12:34.127-06
left     | function "memcollect" already exists with same argument types
detail   |
query    | CREATE AGGREGATE memcollect(                                                                          +
         |         sfunc = ST_collect,                                                                           +
         |         basetype = geometry,                                                                          +
         |         stype = geometry                                                                              +
         |         );
-[ RECORD 12 ]---------------------------------------------------------------------------------------------------
log_time | 2019-09-27 10:13:36.998-06
left     | function "extent" already exists with same argument types
detail   |
query    | CREATE AGGREGATE Extent(                                                                              +
         |         sfunc = ST_CombineBbox,                                                                       +
         |         basetype = geometry,                                                                          +
         |         finalfunc = box2d,                                                                            +
         |         stype = box3d                                                                                 +
         |         );
-[ RECORD 13 ]---------------------------------------------------------------------------------------------------
log_time | 2019-09-27 10:13:37.042-06
left     | function "makeline" already exists with same argument types
detail   | 
query    | CREATE AGGREGATE makeline (                                                                           +
         |         BASETYPE = geometry,                                                                          +
         |         SFUNC = pgis_geometry_accum_transfn,                                                          +
         |         STYPE = internal,                                                                             +
         |         FINALFUNC = pgis_geometry_makeline_finalfn                                                    +
         |         );

-[ RECORD 14 ]---------------------------------------------------------------------------------------------------
log_time | 2019-09-27 10:13:37.132-06
left     | function "extent3d" already exists with same argument types
detail   |
query    | CREATE AGGREGATE Extent3d(                                                                            +
         |         sfunc = combine_bbox,                                                                         +
         |         basetype = geometry,                                                                          +
         |         stype = box3d                                                                                 +
         |         );
-[ RECORD 15 ]---------------------------------------------------------------------------------------------------
log_time | 2019-09-27 10:13:37.132-06
left     | function "memcollect" already exists with same argument types
detail   | 
query    | CREATE AGGREGATE memcollect(                                                                          +
         |         sfunc = ST_collect,                                                                           +
         |         basetype = geometry,                                                                          +
         |         stype = geometry                                                                              +
         |         );
-[ RECORD 16 ]---------------------------------------------------------------------------------------------------
log_time | 2019-09-27 10:13:37.136-06
left     | function "st_extent3d" already exists with same argument types
detail   | 
query    | CREATE AGGREGATE ST_Extent3D(                                                                         +
         |         sfunc = ST_CombineBbox,                                                                       +
         |         basetype = geometry,                                                                          +
         |         stype = box3d                                                                                 +
         |         );

Change History (6)

comment:1 by robe, 5 years ago

Owner: changed from strk to pramsey

comment:2 by pramsey, 5 years ago

In 17843:

Pg12 catalog table compatibility for upgrade
References #4516

comment:3 by pramsey, 5 years ago

Resolution: fixed
Status: newclosed

In 17844:

Fix scripts-based (not extension) upgrade from 2.4
Closes #4516

comment:4 by Algunenano, 5 years ago

Resolution: fixed
Status: closedreopened

This has broken travis 2.4 branch: https://travis-ci.org/postgis/postgis/builds/592139748

Running tests
 check_gdal .. ok 
 load_outdb ... ok 
 check_raster_columns .. failed (diff expected obtained: /tmp/pgis_reg/test_3_diff)
 check_raster_overviews .. failed (diff expected obtained: /tmp/pgis_reg/test_4_diff)
 rt_io .. ok 
 rt_bytea .. ok 
 box3d .. ok 

comment:5 by pramsey, 5 years ago

In 17850:

Add missing conname column,
References #4516

comment:6 by pramsey, 5 years ago

Resolution: fixed
Status: reopenedclosed
Note: See TracTickets for help on using tickets.