Opened 17 months ago
Last modified 17 months ago
#5471 closed defect
upgrading demo.postgis.net is failing on st_coverageinvalidlocations when pg_upgrading in PG16 — at Initial Version
Reported by: | robe | Owned by: | strk |
---|---|---|---|
Priority: | blocker | Milestone: | PostGIS 3.4.0 |
Component: | build | Version: | master |
Keywords: | Cc: |
Description
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 I had to resort to using:
/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.