Opened 10 months ago

Last modified 8 months ago

#5545 closed defect

Postgis upgrade from 3.2.3 to 3.3.2 failing on create or update function st_orderingequals — at Version 5

Reported by: robe Owned by: strk
Priority: blocker Milestone: PostGIS 3.3.5
Component: upgrade Version: 3.4.x
Keywords: pgextwlist Cc:

Description (last modified by strk)

Putting in this ticket for Dan Worthman as he's having issues setting up an osgeo account.

I'm having some issues with upgrading my postgis extension from 3.2.3 to 3.3.2. I'm on postgres engine 14.7 on AWS RDS Aurora, and my failure is coming from running SELECT postgis_extensions_upgrade();

ERROR: cannot change name of input parameter "geometrya"

HINT: Use DROP FUNCTION st_orderingequals(geometry,geometry) first.

I was told this is fixed in unreleased 3.4.1 https://trac.osgeo.org/postgis/changeset/e428b70577bd51d3924346d9f0124a6d37ef4ff8/git and I would like to request a backport to the 3.3 branch.

I was also directed to try dropping the function:

postgres⇒ DROP FUNCTION st_orderingequals(geometry,geometry);

ERROR: cannot drop function st_orderingequals(geometry,geometry) because extension postgis requires it

HINT: You can drop extension postgis instead.

Strk told me to try alter extension postgis drop function but I am not permitted to do this in RDS Aurora (I opened a support ticket with AWS to try to solve the problem from this angle)

postgres⇒ alter extension postgis drop function st_orderingequals;

ERROR: must be owner of extension postgis

They also told me that according to git log, commit [6082ff04f3/git] fixed the problem but since I am still facing the issue they recommended I open a ticket.

Here is my search path:

postgres⇒ show search_path;

search_path


"$user", public, topology

(1 row)

Change History (5)

comment:1 by robe, 10 months ago

Component: postgisbuild/upgrade/install
Owner: changed from pramsey to strk
Priority: mediumblocker

comment:2 by robe, 10 months ago

@Dan,

Here is the way to work around it for now.

ALTER FUNCTION st_orderingequals(geometry, geometry) RENAME TO st_orderingequals_old;

That should get you past the upgrade issue. You'll have to address later though.

strk — what is the naming convention you use so it can be auto dropped later.

comment:3 by strk, 10 months ago

It'd be st_orderingequals_deprecated_by_postgis_300

comment:4 by strk, 10 months ago

robe I'm not sure if ALTER FUNCTION issued by user (assuming he can, as I suspect he still has permission issues with that) will be enough to get the function dropped later, because of the deprecated function not being unregistered from the extension.

That said, I do see st_orderingequals passed to _postgis_drop_function_if_needed in postgis_before_upgrade.sql of stable-3.3 branch so now I wonder why that failed for the reporter. Maybe the function is not working in some environment ?

For the reporter: what does this query return for you ?

select pg_get_function_identity_arguments('st_orderingequals'::regproc);

comment:5 by strk, 10 months ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.