<div dir="ltr">Hi Sandro,<div><br></div><div>Old error is gone after the workaround( I had to add a hyphen in 2.5 in sed command).</div><div><br></div><div>I see we are getting different error now and looks like there are a lot of objects dependent on functions which are being dropped.</div><div><br></div><div><p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">db1=# alter extension postgis update;</span></p>
<p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">WARNING:<span class="gmail-Apple-converted-space">  </span>unpackaging raster</span></p>
<p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">WARNING:<span class="gmail-Apple-converted-space">  </span>PostGIS Raster functionality has been unpackaged</span></p>
<p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">HINT:<span class="gmail-Apple-converted-space">  </span>type `SELECT postgis_extensions_upgrade();` to finish the upgrade. After upgrading, if you want to drop raster, run: DROP EXTENSION postgis_raster;</span></p>
<p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">ERROR:<span class="gmail-Apple-converted-space">  </span>cannot drop function st_buffer(geometry,double precision) because other objects depend on it</span></p>
<p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">DETAIL:<span class="gmail-Apple-converted-space">  </span>view xxxxx depends on function st_buffer(geometry,double precision)</span></p>
<p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">HINT:<span class="gmail-Apple-converted-space">  </span>Use DROP ... CASCADE to drop the dependent objects too.</span></p>
<p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><br></p>
<p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">db1=# drop view xxxxx;</span></p>
<p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">DROP VIEW</span></p><p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><br></span></p>
<p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">geo=# alter extension postgis update;</span></p>
<p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">WARNING:<span class="gmail-Apple-converted-space">  </span>unpackaging raster</span></p>
<p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">WARNING:<span class="gmail-Apple-converted-space">  </span>PostGIS Raster functionality has been unpackaged</span></p>
<p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">HINT:<span class="gmail-Apple-converted-space">  </span>type `SELECT postgis_extensions_upgrade();` to finish the upgrade. After upgrading, if you want to drop raster, run: DROP EXTENSION postgis_raster;</span></p>
<p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">ERROR:<span class="gmail-Apple-converted-space">  </span>cannot drop function st_intersection(geometry,geometry) because other objects depend on it</span></p>
<p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">DETAIL:<span class="gmail-Apple-converted-space">  </span>function xxxxx depends on function st_intersection(geometry,geometry)</span></p>
<p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">view xxxxx depends on function st_intersection(geometry,geometry)</span></p>
<p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">HINT:<span class="gmail-Apple-converted-space">  </span>Use DROP ... CASCADE to drop the dependent objects too.</span></p>
<p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><br></p><p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)">Is there a way to identify the list of objects being dropped? and which all views/functions depend on these dropped objects?</p><p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><br></p><p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)">Thanks,</p><p style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)">Nikhil</p></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Apr 17, 2023 at 2:54 PM Nikhil Shetty <<a href="mailto:nikhil.dba04@gmail.com">nikhil.dba04@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Sandro,<div><br></div><div>Thank you, I will try the workaround</div><div><br></div><div>BUT I'm wondering: why would you want to upgrade to 3.1.2 when the<br>latest PostGIS version in the 3.1 branch is 3.1.8 ?<br></div><div> -- We started with the upgrade at a time when 3.1.2 was the latest version. We will try to add the newer version in future upgrades.</div><div><br></div><div>Thanks,</div><div>Nikhil</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Apr 14, 2023 at 5:08 PM Sandro Santilli <<a href="mailto:strk@kbt.io" target="_blank">strk@kbt.io</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">On Fri, Apr 14, 2023 at 01:29:02PM +0530, Nikhil Shetty wrote:<br>
<br>
> geo=# alter extension postgis update to '3.1.2';<br>
> ERROR:  could not access file "$libdir/postgis-2.5": No such file or directory<br>
<br>
[...]<br>
<br>
> We removed the old 2.5.4 packages and installed 3.1.2<br>
> <br>
> ls -l /usr/pgsql-10/lib | grep postgis<br>
> <br>
> -rwxr-xr-x 1 root root 1047128 Jun 29  2021 *postgis*-3.so<br>
> -rwxr-xr-x 1 root root  850416 Jun 29  2021 *postgis*_raster-3.so<br>
> -rwxr-xr-x 1 root root  435656 Jun 29  2021 *postgis*_sfcgal-3.so<br>
> -rwxr-xr-x 1 root root  565008 Jun 29  2021 *postgis*_topology-3.so<br>
<br>
A quick workaround should be something along these lines:<br>
<br>
  for f in $('ls' /usr/pgsql-10/lib/*postgis*-3.so); do<br>
    l=$(echo "$f" | sed 's/-3\./2.5./')<br>
    ln -vs "$f" "$l"<br>
  done<br>
<br>
BUT I'm wondering: why would you want to upgrade to 3.1.2 when the<br>
latest PostGIS version in the 3.1 branch is 3.1.8 ?<br>
<br>
I'm asking because according to the NEWS file the bug you report<br>
was fixed in 3.1.5:<br>
<br>
  <a href="https://git.osgeo.org/gitea/postgis/postgis/src/tag/3.1.5/NEWS#L12" rel="noreferrer" target="_blank">https://git.osgeo.org/gitea/postgis/postgis/src/tag/3.1.5/NEWS#L12</a><br>
<br>
--strk;<br>
_______________________________________________<br>
postgis-devel mailing list<br>
<a href="mailto:postgis-devel@lists.osgeo.org" target="_blank">postgis-devel@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/postgis-devel" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/postgis-devel</a><br>
</blockquote></div>
</blockquote></div>