postgis / docker-postgis

Docker image for PostGIS
https://hub.docker.com/r/postgis/postgis/
MIT License
1.39k stars 466 forks source link

update-postgis.sh throws error on upgrading from 2.5 to 3.0 #207

Open iamareebjamal opened 4 years ago

iamareebjamal commented 4 years ago

When upgrading from postgis:12-2.5-alpine to postgis:12-3.0-alpine, the command update-postgis.sh throws this error:

Updating PostGIS extensions 'template_postgis' to 3.0.2
NOTICE:  extension "postgis" already exists, skipping
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;
ERROR:  could not access file "$libdir/postgis-2.5": No such file or directory
CONTEXT:  PL/pgSQL function _postgis_drop_function_if_needed(text,text) line 6 at FOR over SELECT rows
phillipross commented 4 years ago

It might be the case that the docker images do not support automatic upgrades between major versions. There may be some special instructions for 2.x to 3.x upgrades that have not been encapsulated in the docker upgrade scripts, especially around the changes to the raster extension. See PR #190 for reference.