[postgis-tickets] [PostGIS] #5471: upgrading demo.postgis.net is failing on st_coverageinvalidlocations when pg_upgrading in PG16
PostGIS
trac at osgeo.org
Thu Aug 10 20:42:45 PDT 2023
#5471: upgrading demo.postgis.net is failing on st_coverageinvalidlocations when
pg_upgrading in PG16
------------------------------------+---------------------------
Reporter: robe | Owner: strk
Type: defect | Status: new
Priority: blocker | Milestone: PostGIS 3.4.0
Component: build/upgrade/install | Version: master
Resolution: | Keywords:
------------------------------------+---------------------------
Description changed by robe:
Old 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.
New 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 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.
--
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5471#comment:1>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-tickets
mailing list