<div dir="ltr">Hi Sandro,<br><br>Thank you so much for your kind input to this issue, I really appreciate it. I have one final question:<br><br><h3 class="gmail-iw gmail-gFxsud" style="overflow:hidden;font-size:0.75rem;font-weight:inherit;margin:inherit;text-overflow:ellipsis;font-family:"Google Sans",Roboto,RobotoDraft,Helvetica,Arial,sans-serif;color:rgb(95,99,104);line-height:20px"><div style="padding:0px 0px 0px 2px"><div style="color:rgb(0,0,0);font-family:Consolas;font-size:10pt"><p style="margin:0px"><span style="color:rgb(128,128,128)">-- 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.</span></p><p style="margin:0px"><span style="color:rgb(128,128,128)">-- However I want to remove it carefully, giving thought to my earlier </span><span style="font-size:10pt;font-weight:inherit">mistaken update of pg_proc</span><span style="color:rgb(128,128,128);font-size:10pt;font-weight:inherit"> that we have been discussing.</span></p><p style="margin:0px"><span style="color:rgb(128,128,128)">--</span></p><p style="margin:0px"><span style="color:rgb(128,128,128)">-- I am following <a href="https://postgis.net/documentation/tips/tip-removing-raster-from-2-3/">https://postgis.net/documentation/tips/tip-removing-raster-from-2-3/</a></span></p><p style="margin:0px"><span style="color:rgb(128,128,128)">-- Here are my findings so far and my KEY QUESTIONS at the bottom:</span></p><p style="margin:0px"><span style="color:rgb(128,128,128)">--</span></p><p style="margin:0px"><br></p><p style="margin:0px"><br></p><p style="margin:0px"><span style="color:rgb(128,0,0);font-weight:bold">ALTER</span> <span style="color:rgb(128,0,0);font-weight:bold">EXTENSION</span> postgis <span style="color:rgb(128,0,0);font-weight:bold">UPDATE</span><span style="color:rgb(255,0,0)">;</span></p><p style="margin:0px"><span style="color:rgb(128,128,128)">-- This has already been run a while earlier to solve the more general problem of not recognising geo types etc after our move to Red Hat 9 and postgis 3</span></p><p style="margin:0px"><br></p><p style="margin:0px"><span style="color:rgb(128,0,0);font-weight:bold">SELECT</span> postgis_extensions_upgrade()<span style="color:rgb(255,0,0)">;</span></p><p style="margin:0px"><span style="color:rgb(128,128,128)">-- I have not yet run this (neither once nor twice) - I was in the process in my earlier post of discussing if it would still work given my first mistake</span></p><p style="margin:0px"><br></p><p style="margin:0px"><br></p><p style="margin:0px"><span style="color:rgb(128,0,0);font-weight:bold">SELECT</span> postgis_full_extension()<span style="color:rgb(255,0,0)">;</span></p><p style="margin:0px"><span style="color:rgb(128,128,128)">-- function not found</span></p><p style="margin:0px"><br></p><p style="margin:0px"><span style="color:rgb(128,0,0);font-weight:bold">SELECT</span> <span style="color:rgb(0,0,128);font-weight:bold">postgis_full_version</span>()<span style="color:rgb(255,0,0)">;</span></p><p style="margin:0px"><span style="color:rgb(128,128,128)">--POSTGIS="3.4.2 c19ce56" [EXTENSION] PGSQL="120" </span></p><p style="margin:0px"><span style="color:rgb(128,128,128)">--GEOS="3.12.2-CAPI-1.18.2" </span></p><p style="margin:0px"><span style="color:rgb(128,128,128)">--PROJ="9.4.1 NETWORK_ENABLED=OFF URL_ENDPOINT=<a href="https://cdn.proj.org">https://cdn.proj.org</a> USER_WRITABLE_DIRECTORY=/var/lib/pgsql/.local/share/proj DATABASE_PATH=/usr/proj94/share/proj/proj.db" </span></p><p style="margin:0px"><span style="color:rgb(128,128,128)">--LIBXML="2.9.13" </span></p><p style="margin:0px"><span style="color:rgb(128,128,128)">--LIBJSON="0.14" </span></p><p style="margin:0px"><span style="color:rgb(128,128,128)">--LIBPROTOBUF="1.3.3" </span></p><p style="margin:0px"><span style="color:rgb(128,128,128)">--WAGYU="0.5.0 (Internal)" </span></p><p style="margin:0px"><span style="color:rgb(128,128,128)">--(raster procs from "2.5.5 r0" need upgrade)</span></p><p style="margin:0px"><br></p><p style="margin:0px"><span style="color:rgb(128,128,128)">-- I DO NOT SEE [UNPACKAGED!]</span></p><p style="margin:0px"><br></p><p style="margin:0px"><br></p><p style="margin:0px"><span style="color:rgb(128,0,0);font-weight:bold">SELECT</span> <span style="color:rgb(0,0,128);font-weight:bold">count</span>(<span style="color:rgb(0,0,255)">1</span>) <span style="color:rgb(128,0,0);font-weight:bold">FROM</span> <span style="color:rgb(142,0,198)">raster_columns</span><span style="color:rgb(255,0,0)">;</span></p><p style="margin:0px"><span style="color:rgb(128,128,128)">-- 0</span></p><p style="margin:0px"><br></p><p style="margin:0px"><span style="color:rgb(128,128,128)">-- KEY QUESTIONS</span></p><p style="margin:0px"><span style="color:rgb(128,128,128)">--</span></p><p style="margin:0px"><span style="color:rgb(128,128,128)">-- Q1:</span></p><p style="margin:0px"><span style="color:rgb(128,128,128)">-- Given my earlier mistaken update of pg_proc first and the subsequent findings above following <a href="https://postgis.net/documentation/tips/tip-removing-raster-from-2-3/">https://postgis.net/documentation/tips/tip-removing-raster-from-2-3/</a></span></p><p style="margin:0px"><span style="color:rgb(128,128,128)">-- Taking this mistake into account, I am wondering since I now believe I do not need the raster functions at all...</span></p><p style="margin:0px"><span style="color:rgb(128,128,128)">-- Whether I can simply successfully run <a href="https://postgis.net/stuff/uninstall_rtpostgis.sql">https://postgis.net/stuff/uninstall_rtpostgis.sql</a> . I presume its dropping of the functions will also remove rt related rows from pg_proc whether I broke them or not.</span></p><p style="margin:0px"><span style="color:rgb(128,128,128)">--</span></p><p style="margin:0px"><span style="color:rgb(128,128,128)">-- Q2:</span></p><p style="margin:0px"><span style="color:rgb(128,128,128)">-- Given I have already ran ALTER EXTENSION postgis UPDATE; to solve the basics of postgis not working</span></p><p style="margin:0px"><span style="color:rgb(128,128,128)">-- If running <a href="https://postgis.net/stuff/uninstall_rtpostgis.sql">https://postgis.net/stuff/uninstall_rtpostgis.sql</a> is successful, will this make loading the v12 DB into v16 a lot easier?</span></p><p style="margin:0px"><span style="color:rgb(128,128,128)">-- Are there any SELECT checks I should make after running <a href="https://postgis.net/stuff/uninstall_rtpostgis.sql">https://postgis.net/stuff/uninstall_rtpostgis.sql</a> to see all is good.</span></p><p style="margin:0px"><br></p><p style="margin:0px">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. </p><p style="margin:0px"><br></p><p style="margin:0px">Andrew</p><p style="margin:0px"><br></p><p style="margin:0px"><br></p><p style="margin:0px"></p></div></div></h3><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 7 Aug 2024 at 18:07, Sandro Santilli <<a href="mailto:strk@kbt.io">strk@kbt.io</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Mon, Jul 01, 2024 at 04:37:37PM +0100, Andrew Hardy wrote:<br>
> Thank you so much for your response, I appreciate it.<br>
> <br>
> I omitted to mention that before I messaged I had tried to resolve this in<br>
> the pg_proc table and ran the following query:<br>
> <br>
> UPDATE pg_proc SET probin = '$libdir/postgis-3' WHERE probin =<br>
> '$libdir/rtpostgis-2.5';<br>
> <br>
> This was probably a mistake (not least that postgis-3 is not the raster<br>
> library) and I am wondering if this is resolvable.<br>
<br>
Yes, it was a mistake.<br>
Running this should fix it:<br>
<br>
SELECT postgis_extensions_upgrade();<br>
<br>
> Q1: And I am wondering if the postgis_extensions_upgrade() mentioned in<br>
> the upgrade instructions assumes one is starting from a particular state<br>
> and I need to get back there from my mistake above or if this upgrade<br>
> function will resolve things whatever the state.<br>
<br>
It tries its best to resolve things whatever the state, but I guess it<br>
could fail, you'll tell us.<br>
<br>
> Q2: Should I still run postgis_full_version() - is this function a<br>
> benign query, unlike postgis_extensions_upgrade() ?<br>
<br>
Always run `postgis_full_version()` to tell what the state of the<br>
database is.<br>
<br>
--strk;<br>
</blockquote></div>