Fixing or removing raster functions after a mistake
Andrew Hardy
andrew.hardy at sabstt.com
Thu Sep 5 01:29:39 PDT 2024
-- Hi,
-- First of all I apologise as these questions come out of my own mistakes,
but I would be very grateful for some input before I take action.
--
-- While trying to load v12 database into v16 I was getting errors relating
to raster functions.
-- Initially I decided to try to fix the postgis raster functionality but
not finding the documentation I mistakenly ran this
-- UPDATE pg_proc SET probin = '$libdir/postgis-3' WHERE probin =
'$libdir/rtpostgis-2.5';
--
-- Subsequently I have now decided we do not actually need the raster
functionality, so I am thinking I could remove it before trying to load v12
database into v16.
-- However I want to remove it carefully, giving thought to my earlier
mistake.
--
-- I am following
https://postgis.net/documentation/tips/tip-removing-raster-from-2-3/
-- Here are my findings so far and my KEY QUESTIONS at the bottom:
--
ALTER EXTENSION postgis UPDATE;
-- This has already been run to solve the more general problem of not
recognising geo types etc after our move to Red Hat 9 and postgis 3
SELECT postgis_extensions_upgrade();
-- I have not yet run this (once or twice) - I was in the process of
discussing if it would still work given my mistake above
SELECT postgis_full_extension();
-- function not found
SELECT postgis_full_version();
--POSTGIS="3.4.2 c19ce56" [EXTENSION] PGSQL="120"
--GEOS="3.12.2-CAPI-1.18.2"
--PROJ="9.4.1 NETWORK_ENABLED=OFF URL_ENDPOINT=https://cdn.proj.org
USER_WRITABLE_DIRECTORY=/var/lib/pgsql/.local/share/proj
DATABASE_PATH=/usr/proj94/share/proj/proj.db"
--LIBXML="2.9.13"
--LIBJSON="0.14"
--LIBPROTOBUF="1.3.3"
--WAGYU="0.5.0 (Internal)"
--(raster procs from "2.5.5 r0" need upgrade)
-- I DO NOT SEE [UNPACKAGED!]
SELECT count(1) FROM raster_columns;
-- 0
-- KEY QUESTIONS
--
-- Q1:
-- Given the above mistaken update of pg_proc first and the subsequent
findings above following
https://postgis.net/documentation/tips/tip-removing-raster-from-2-3/
-- Taking this mistake into account, I am wondering since I now believe I
do not need the raster functions at all...
-- Whether I can simply successfully run
https://postgis.net/stuff/uninstall_rtpostgis.sql . I presume dropping the
functions will also remove rt related rows from pg_proc whether I broke
them or not.
--
-- Q2:
-- Given I have already run ALTER EXTENSION postgis UPDATE; to solve the
basics of postgis not working on PostgreSQL v12 REd Hat 9 with postgis 3
-- If running https://postgis.net/stuff/uninstall_rtpostgis.sql is
successful, will this make loading the v12 DB into v16 a lot easier?
-- Are there any SELECT checks I should make after running
https://postgis.net/stuff/uninstall_rtpostgis.sql to see if everything is
good.
Thanks. Presumably once things are fully stable in v16 and fully without
raster functions, at some later date we could reintroduce raster if we
suddenly needed it. Andrew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20240905/e2f1bfd2/attachment.htm>
More information about the postgis-users
mailing list