1

I am trying to update a server containing CKAN software from Ubuntu 18 to Ubuntu 20. Due to this upgrade, Postgres is updated from version 10 with PostGIS 2.4 to version 12 with PostGIS 3.

I read online many guides that suggest to use pg_upgradecluster and then alter extension postgis update; but in my case I receive the error:

ERROR: extension "postgis" does not exist

So I looked at a previous dump of the database that I am trying to migrate and postgis extension is not declared, instead there are many functions that recall PostGIS libraries directly:

CREATE FUNCTION public.box2d_in(cstring) RETURNS public.box2d
    LANGUAGE c IMMUTABLE STRICT
    AS '$libdir/postgis-2.2', 'BOX2D_in';

If I upgrade Ubuntu 18 to 20 and try to perform a dump of CKAN database I receive an error that says that '$libdir/postgis-2.2' is missing.

Is there a way to perform this upgrade?

J.B.
  • 195
  • 3
  • 11

0 Answers0