#5471 closed defect (fixed)

upgrading demo.postgis.net is failing on st_coverageinvalidlocations when pg_upgrading in PG16

Reported by: robe Owned by: strk
Priority: blocker Milestone: PostGIS 3.4.0
Component: build Version: master
Keywords: Cc:

Description (last modified by robe)

I was trying to upgrade demo.postgis.net to latest PG16 and it's failing because of this

pg_restore: from TOC entry 943; 1255 17106 FUNCTION st_coverageinvalidlocations("public"."geometry", double precision) robe
pg_restore: error: could not execute query: ERROR:  could not find function "ST_CoverageInvalidLocations" in file "/usr/lib/postgresql/16/lib/postgis-3.so"
Command was: CREATE FUNCTION "public"."st_coverageinvalidlocations"("geom" "public"."geometry", "tolerance" double precision DEFAULT 0.0) RETURNS "public"."geometry"
    LANGUAGE "c" WINDOW IMMUTABLE STRICT COST 5000 PARALLEL SAFE
    AS '$libdir/postgis-3', 'ST_CoverageInvalidLocations';

-- For binary upgrade, handle extension membership the hard way
ALTER EXTENSION "postgis" ADD FUNCTION "public"."st_coverageinvalidlocations"("geom" "public"."geometry", "tolerance" double precision);

Sadly our upgrade scripts don't catch this or drop it, so I have a broken install I can't upgrade.

I think we need to add this tou our drop list, cause we changed this function midway in 3.4.0. Sure only reckless people like me would be impacted by this, but someone has to look out for us.

The other annoying thing about this is after doing:

pg_renamecluster 16 main main.old

I had to resort to using:

su postgres
cd ~/
pg_dropcluster 16 main
pg_createcluster 16 main
/usr/lib/postgresql/16/bin/pg_upgrade -b /var/tmp/postgresql-16-202305211/bin -B /usr/lib/postgresql/16/bin -p 5432 -P 5433 -d /etc/postgresql/16/main.old -D /etc/postgresql/16/main
 

instead of my preferred short-hand of:

pg_upgradecluster 16 main.old --rename main -m upgrade -v 16 --old-bindir=/var/tmp/postgresql-16-202305211/bin

Sadly for some reason pg_upgradecluster in this situation wipes out all the files it asks me to check for guidance.

Change History (2)

comment:1 by robe, 15 months ago

Description: modified (diff)

comment:2 by Regina Obe <lr@…>, 15 months ago

Resolution: fixed
Status: newclosed

In 9376923/git:

Drop ST_CoverageInvalidLocations
was renamed to ST_CoverageInvalidEdges

Closes #5471 for PostGIS 3.4.0

Note: See TracTickets for help on using tickets.