ERROR: function bytea(raster) is not a member of extension "postgis_raster"

446 views
Skip to first unread message

Giovanni Manghi

unread,
Sep 22, 2022, 9:08:36 AM9/22/22
to PostGIS Users
Hi all,

I'm trying to document the steps to upgrade from a PostgreSQL 10 Server with PostGIS 2.5(.5) with databases that include raster tables, to a PostgreSQL 14 / PostGIS 3 installation, but I'm having a problem when doing that on Ubuntu 18.04, while on Windows I had no issues.

The problem on Ubuntu is that after installing postgresql-10-postgis-3-scripts (on top of 2.5) I get an error when trying upgrade PostGIS within the databases.


and run twice

SELECT postgis_extensions_upgrade();

the first time getting

testes=# SELECT postgis_extensions_upgrade();
WARNING:  unpackaging raster
WARNING:  PostGIS Raster functionality has been unpackaged
HINT:  type `SELECT postgis_extensions_upgrade();` to finish the upgrade. After upgrading, if you want to drop raster, run: DROP EXTENSION postgis_raster;
NOTICE:  ALTER EXTENSION postgis UPDATE TO "3.2.1";

the second one getting

testes=# SELECT postgis_extensions_upgrade();
NOTICE:  Extension postgis_sfcgal is not available or not packagable for some reason
NOTICE:  Packaging extension postgis_raster
ERROR:  function bytea(raster) is not a member of extension "postgis_raster"
DETAIL:  An extension is not allowed to replace an object that it does not own.
CONTEXT:  SQL statement "CREATE EXTENSION postgis_raster SCHEMA public VERSION unpackaged;ALTER EXTENSION postgis_raster UPDATE TO "3.2.1""

I then run alone

CREATE EXTENSION postgis_raster SCHEMA public VERSION unpackaged;

which worked

\dx

---------+---------+------------+---------------------------------------------------------------------
 plpgsql | 1.0     | pg_catalog | PL/pgSQL procedural language
 postgis | 3.2.1   | public     | PostGIS geometry, geography, and raster spatial types and functions


but running

ALTER EXTENSION postgis_raster UPDATE TO "3.2.1";

returns

ERROR:  function bytea(raster) is not a member of extension "postgis_raster"
DETAIL:  An extension is not allowed to replace an object that it does not own.


At this point seems to me that the upgrade to PostGIS 3 is incomplete, because if I try to upgrade the cluster with pg_upgradecluster I get a bunch of errors about rasters functions already existing, and if try with pg_upgrade the process stops with an error

"Your installation references loadable libraries that are missing from the new installation.  You can add these libraries to the new installation, or remove the functions using them from the old installation.  A list of problem libraries is in the file: loadable_libraries.txt"

with loadable_libraries.txt containing


could not load library "$libdir/rtpostgis-2.5": ERROR:  could not access file "$libdir/rtpostgis-2.5": No such file or directory


Any hint/help is appreciated

regards

-- GM --





Giovanni Manghi

unread,
Sep 22, 2022, 9:10:18 AM9/22/22
to PostGIS Users
Note: packages being used are the ones coming from https://www.postgresql.org/download/linux/ubuntu/

Giovanni Manghi

unread,
Sep 23, 2022, 12:20:07 PM9/23/22
to PostGIS Users
is this a packaging issue or am I doing something wrong? I would like to confirm if is the former, I'll appreciate any feedback.

regards

-- GM --

Anders Bälter

unread,
Mar 29, 2023, 8:24:17 AM3/29/23
to PostGIS Users
Also seeing this error, and looking for a remedy.
Reply all
Reply to author
Forward
0 new messages