[postgis-users] Fwd: Re: Broken installs for PostGIS for Ubuntu 20.04LTS / Focal?

Marco Boeringa marco at boeringa.demon.nl
Fri May 15 06:01:35 PDT 2020


Hi Regina,

Thanks for explaining the reasons behind this. Yes, in hindsight putting 
a note up about deprecation could have helped, although in my case the 
function was part of some code I found on the Net and adjusted a little, 
so I didn't really have a reason to lookup the 'ST_Accum' function in 
the Help up to now, so would still have run into this.

Anyway, it is fixed now, and the code runs fine after switching to 
'array_agg'.

Marco

Op 15-5-2020 om 14:39 schreef Regina Obe:
>
> Several reasons
>
> 1)Each function in itself is not that much, but compounded over many 
> functions is a huge headache as if we change the newer version, we’d 
> then have to remember to change the wrapper and in this case we’d have 
> to keep track of what PostgreSQL is doing upstream since we have no 
> control of array_agg. Aggregates are especially annoying since we had 
> a state function tied behind this.  So was really like 4 functions.
>
> 2)array_agg has been in PostgreSQL for a long long time.  We assumed 
> most users would be using that already instead of ST_Accum. There 
> really was no reason to use ST_Accum past PostGIS 1.5 for any version 
> of PostgreSQL. Granted we should have put a note on the page – 
> deprecated so people new we’d be taking it out.
>
> 3)Wrappers are slower.  In the case of ST_Accum(), I think it’s 
> significantly slower
>
> 4)People are already complaining about too many functions in PostGIS.  
> So keeping around old ones that we don’t want people using anyway just 
> adds to the frustration of new users.
>
> *From:*postgis-users [mailto:postgis-users-bounces at lists.osgeo.org] 
> *On Behalf Of *Marco Boeringa
> *Sent:* Friday, May 15, 2020 7:59 AM
> *To:* postgis-users at lists.osgeo.org
> *Subject:* Re: [postgis-users] Fwd: Re: Broken installs for PostGIS 
> for Ubuntu 20.04LTS / Focal?
>
> Hi Regina,
>
> Yes, I found this via Google. After the update, it now indeed errors 
> out on a 404. ST_Collect also no longer mentions it, so that seems 
> fine now.
>
> I do slightly wonder by the way why ST_Accum wasn't simple 
> re-implemented as a wrapper around 'array_agg'. While I appreciate 
> breaking changes may be necessary and are to be expected for a major 
> version update like 2.x to 3.x, in this particular case, where 
> wrapping the function would have been an easy solution, could have 
> avoided breaking existing code with minimal effort and maintenance 
> overhead.
>
> Anyway, the required code changes are luckily minimal as well, just 
> replace 'ST_Accum()' with 'array_agg()' as per the OSGeo tickets I 
> saw, so that is not a big deal. I have now implemented this in my own 
> code.
>
> Marc,
>
> Op 15-5-2020 om 13:24 schreef Regina Obe:
>
>     Yes stray doc.  Did you find this via google.  Looks like that
>     page last got updated 4/17/2019.   It’s the nature of how we build
>     the docs that the updates overwrite existing for a particular
>     Minor version, but don’t delete.
>
>     So it existed early in the life cycle of 3.0 but was later removed
>
>     Anyway I’ve deleted ST_Length2D_Spheroid.html and
>     ST_Point_Inside_Circle.html which also seemed to have the same issue
>
>     *From:*postgis-users
>     [mailto:postgis-users-bounces at lists.osgeo.org] *On Behalf Of
>     *Darafei "Kom?pa" Praliaskouski
>     *Sent:* Friday, May 15, 2020 5:55 AM
>     *To:* PostGIS Users Discussion <postgis-users at lists.osgeo.org>
>     <mailto:postgis-users at lists.osgeo.org>
>     *Subject:* Re: [postgis-users] Fwd: Re: Broken installs for
>     PostGIS for Ubuntu 20.04LTS / Focal?
>
>     It is mentioned in changelog and removed from the docs. For
>     some reason there is stray page from older release.
>
>     On Fri, May 15, 2020 at 12:52 PM Tom van Tilburg
>     <tom.van.tilburg at gmail.com <mailto:tom.van.tilburg at gmail.com>> wrote:
>
>         It's the first thing I ran into as well after upgrading .
>
>         But it hasn't been mentioned in the docs? Whoops... time for
>         an issue...
>
>         Tom
>
>         On Fri, May 15, 2020 at 10:56 AM Marco Boeringa
>         <marco at boeringa.demon.nl <mailto:marco at boeringa.demon.nl>> wrote:
>
>             Tom,
>
>             It now appears the PostGIS team indeed removed 'ST_Accum',
>             but forgot to update the online PostGIS Help. I see two
>             OSGEO tickets related to this:
>
>             https://trac.osgeo.org/postgis/ticket/4356
>
>             https://trac.osgeo.org/postgis/changeset/17397
>
>             Both mention replacing 'ST_Accum' with 'array_agg'.
>
>             Marco
>
>             Op 15-5-2020 om 10:38 schreef Marco Boeringa:
>
>                 Tom,
>
>                 One more question:
>
>                 After successfully installing the PostGIS 3.0.1
>                 extension using CREATE EXTENSION in pgAdmin4 on
>                 PostgreSQL 12.3 on Ubuntu 20.04 Focal, I now ran into
>                 an issue where it appears the 'ST_Accum' function is
>                 missing in my PostGIS install. My code calls this, and
>                 it failed. I then had a look at the function list in
>                 pgAdmin, and indeed 'ST_Accum' is not listed. I do see
>                 loads of other PostGIS functions, just 'ST_Accum'
>                 seems missing (although I cannot garantuee there are a
>                 few more missing functions, but the list seems pretty
>                 comprehensive from a quick look, and the CREATE
>                 EXTENSION call went without a hitch).
>
>                 Can you confirm you see 'ST_Accum' in your PostGIS
>                 3.0.1 function list if you look in pgAdmin? The
>                 PostGIS Help does not mention some deprecation of this
>                 function:
>
>                 https://postgis.net/docs/ST_Accum.html
>
>                 Marco
>
>                 Op 14-5-2020 om 11:42 schreef Tom van Tilburg:
>
>                     Whatever lives in /usr/local/lib was my manual
>                     build so I had to delete that manually.
>
>                     I did  `sudo rm /usr/local/lib/libgeos*` (same for
>                     proj and sfcgal)
>
>                     On top of that I purged all old package
>                     configurations `sudo apt purge <packagename>` just
>                     to be sure but I don't think it is needed.
>
>                     Best,
>
>                      Tom
>
>                     On Thu, May 14, 2020 at 10:45 AM Marco Boeringa
>                     <marco at boeringa.demon.nl
>                     <mailto:marco at boeringa.demon.nl>> wrote:
>
>                         Hi Tom,
>
>                         Thanks for the tip, but what did you do to
>                         remove the old install? Did you rely on Apt or
>                         Synaptic to remove the old libgeos version, or
>                         did you manually clean up folders? I had two
>                         versions of libgeos as well (3.7 and 3.8) if I
>                         remember well (need to start up the VM again
>                         to check), and removed the older one through
>                         Synaptic just leaving the 3.8 version, but
>                         that wasn't enough to solve my particular issues.
>
>                         Marco
>
>                         Op 14-5-2020 om 10:32 schreef Tom van Tilburg:
>
>                             I think I solved it.
>
>                             The issue lies with gdal, not postgis
>                             (test by running `gdalinfo`), and it turns
>                             out there was an old install of libgeos
>                             (3.7) in my /us/local/lib. After simply
>                             removing all related files in
>                             /usr/local/lib gdal (and postgis and qgis)
>                             stopped complaining (I had to remove old
>                             installs of geos, proj and sfcgal for that).
>
>                             This issue put me on the right track:
>
>                             https://github.com/OSGeo/gdal/issues/2214
>
>                             T.
>
>                             On Wed, May 13, 2020 at 3:15 PM Marco
>                             Boeringa <marco at boeringa.demon.nl
>                             <mailto:marco at boeringa.demon.nl>> wrote:
>
>                                 Thanks Tom,
>
>                                 I have seen a similar error related to
>                                 the "libgdal26" library, but that was
>                                 after other trials to get something
>                                 running on Ubuntu 20.04 Focal, where I
>                                 successfully installed PostGIS 2.5.4,
>                                 but then encountered issues when my
>                                 code called the
>                                 "postgis_full_version()" function and
>                                 errored out with the error message
>                                 below related to the "libgdal.so.26"
>                                 library. However, as said, this was
>                                 with PostGIS 2.5.4, not with the
>                                 PostGIS 3.0.1 I actually want to
>                                 install at this moment and that gave
>                                 the other error related to the
>                                 "postgis-3.so" library.
>
>                                 SQL Error [XX000]: ERROR: could not
>                                 load library
>                                 "/usr/lib/postgresql/11/lib/rtpostgis-2.5.so
>                                 <http://rtpostgis-2.5.so>":
>                                 /usr/lib/libgdal.so.26: undefined
>                                 symbol: GEOSMakeValid_r
>                                   Where: SQL statement "SELECT
>                                 public.postgis_gdal_version()"
>                                 PL/pgSQL function
>                                 postgis_full_version() line 34 at SQL
>                                 statement
>
>                                 Marco
>
>                                 Sorry for the short answer, am on the
>                                 way currently. Will try to do a decent
>                                 report tonight.
>
>                                 Error is roughly the same but comes
>                                 from libgdal26 in my case when doing
>                                 apt install qgis after an upgrade to
>                                 20.04.
>
>                                 best, Tom
>
>                                 On Wed, 13 May 2020, 14:48 Marco
>                                 Boeringa, <marco at boeringa.demon.nl
>                                 <mailto:marco at boeringa.demon.nl>> wrote:
>
>                                     Thanks for the response Tom, but
>                                     could you be a bit more specific?
>
>                                     What do you mean with "Same
>                                     problem with qgis"? Do you mean
>                                     you've also encountered a
>                                     "undefined symbol: GEOSMakeValid"
>                                     error related to the
>                                     "postgis-3.so" library when trying
>                                     to use some tool in QGIS?
>
>                                     I have installed PostgreSQL 12 and
>                                     PostGIS 3.0.1 via Synaptic on
>                                     Ubuntu 20.04 (Focal) and use
>                                     CREATE EXTENSION (via pgAdmin4),
>                                     when I encounter the error.
>
>                                     Marco
>
>                                     Op 13-5-2020 om 14:40 schreef Tom
>                                     van Tilburg:
>
>                                         Same problem with qgis
>
>                                         On Wed, 13 May 2020, 11:14
>                                         Marco Boeringa,
>                                         <marco at boeringa.demon.nl
>                                         <mailto:marco at boeringa.demon.nl>>
>                                         wrote:
>
>                                             Hi all,
>
>                                             Is there someone who can
>                                             confirm they have been
>                                             able to install PostGIS
>                                             3.0.1 via the official APT
>                                             repository?:
>
>                                             https://wiki.postgresql.org/wiki/Apt
>
>                                             After using the Synaptics
>                                             Package Manager to install
>                                             the three packages
>                                             involved
>                                             ("postgresql-12-postgis-3"/"postgresql-12-postgis-3-dbgsym"/"postgresql-12-postgis-3-scripts"),
>
>                                             and subsequently trying to
>                                             create the PostGIS
>                                             extension in pgAdmin4, I
>                                             get the following error:
>
>                                             ERROR: could not load
>                                             library
>                                             "/usr/lib/postgresql/12/lib/postgis-3.so":
>
>                                             /usr/lib/postgresql/12/lib/postgis-3.so:
>                                             undefined symbol:
>                                             GEOSMakeValid
>
>                                             I have been trying
>                                             different things to fix
>                                             this for past two days
>                                             including re-install, but
>                                             to no avail. I have also
>                                             attempted to include
>                                             the UbuntuGIS repository
>                                             as a potential alternative
>                                             resource of PostGIS
>                                             packages, but discovered
>                                             the UbuntuGIS repository
>                                             is lagging behind and
>                                             doesn't yet have packages
>                                             for 20.04LTS.
>
>                                             Marco
>
>                                             _______________________________________________
>                                             postgis-users mailing list
>                                             postgis-users at lists.osgeo.org
>                                             <mailto:postgis-users at lists.osgeo.org>
>                                             https://lists.osgeo.org/mailman/listinfo/postgis-users
>
>                                         _______________________________________________
>
>                                         postgis-users mailing list
>
>                                         postgis-users at lists.osgeo.org  <mailto:postgis-users at lists.osgeo.org>
>
>                                         https://lists.osgeo.org/mailman/listinfo/postgis-users
>
>                                 _______________________________________________
>                                 postgis-users mailing list
>                                 postgis-users at lists.osgeo.org
>                                 <mailto:postgis-users at lists.osgeo.org>
>                                 https://lists.osgeo.org/mailman/listinfo/postgis-users
>
>                             _______________________________________________
>
>                             postgis-users mailing list
>
>                             postgis-users at lists.osgeo.org  <mailto:postgis-users at lists.osgeo.org>
>
>                             https://lists.osgeo.org/mailman/listinfo/postgis-users
>
>                         _______________________________________________
>                         postgis-users mailing list
>                         postgis-users at lists.osgeo.org
>                         <mailto:postgis-users at lists.osgeo.org>
>                         https://lists.osgeo.org/mailman/listinfo/postgis-users
>
>                     _______________________________________________
>
>                     postgis-users mailing list
>
>                     postgis-users at lists.osgeo.org  <mailto:postgis-users at lists.osgeo.org>
>
>                     https://lists.osgeo.org/mailman/listinfo/postgis-users
>
>                 _______________________________________________
>
>                 postgis-users mailing list
>
>                 postgis-users at lists.osgeo.org  <mailto:postgis-users at lists.osgeo.org>
>
>                 https://lists.osgeo.org/mailman/listinfo/postgis-users
>
>             _______________________________________________
>             postgis-users mailing list
>             postgis-users at lists.osgeo.org
>             <mailto:postgis-users at lists.osgeo.org>
>             https://lists.osgeo.org/mailman/listinfo/postgis-users
>
>         _______________________________________________
>         postgis-users mailing list
>         postgis-users at lists.osgeo.org
>         <mailto:postgis-users at lists.osgeo.org>
>         https://lists.osgeo.org/mailman/listinfo/postgis-users
>
>
>     -- 
>
>     Darafei Praliaskouski
>
>     Support me: http://patreon.com/komzpa
>
>
>
>     _______________________________________________
>
>     postgis-users mailing list
>
>     postgis-users at lists.osgeo.org  <mailto:postgis-users at lists.osgeo.org>
>
>     https://lists.osgeo.org/mailman/listinfo/postgis-users
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20200515/f341dc3b/attachment.html>


More information about the postgis-users mailing list