[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgis-users
Subject:    Re: [postgis-users] postgis version consistency issue
From:       rmrodriguez () carto ! com
Date:       2019-11-22 10:26:08
Message-ID: CAM6_UM6pczShQ9kJ2s8hpmOKJrHa=aX4g+QEjHovByn-f_W4jw () mail ! gmail ! com
[Download RAW message or body]

This is a bug in our update process, if you have access to the extension files
($sharedir/extension/postgis--ANY--2.5.2.sql, where sharedir is where postgresql
stores it's share objects, `pg_config --sharedir` should give it to
you) then you can
edit the file, and look for a block like this to delete it:
{{{
DO language 'plpgsql'
$$
BEGIN
IF _postgis_scripts_pgsql_version()::integer >= 96 THEN
-- mark ST_Union agg as parallel safe if it is not already
        UPDATE pg_proc SET proparallel = 's'
        WHERE oid = 'st_union(geometry)'::regprocedure AND proparallel = 'u';
END IF;
END;
$$;
}}}

Deleting these 10 lines should allow you to update without issues,
you'll need to run
the `ALTER EXTENSION postgis UPDATE` after the fact.

I'll create an issue to handle this better in following releases so it
doesn't stop updates.

On Fri, Nov 22, 2019 at 11:00 AM <olivier.lobry@umontpellier.fr> wrote:
> 
> Hi
> 
> It looks like I have installation issues with postgis.
> I recently upgrade from pg 9.3 / postgis 2.2.x to pg 11 / postgis 2.5.2
> But I now have some issues with some Postgis functions. For instance :
> SELECT
> st_collect(t.geom) AS geom
> FROM
> a_table t
> 
> rises :
> ERROR:  could not access file "$libdir/postgis-2.4": No such file or directory
> SQL state: 58P01
> 
> 
> It seems it looks for version 2.4, while 2.5.2 is installed :
> 
> $ dpkg -l | grep postgis
> ii  postgis                              2.5.2+dfsg-1~exp1.pgdg90+1          amd64  \
> Geographic objects support for PostgreSQL ii  postgis-doc                          \
> 2.5.2+dfsg-1~exp1.pgdg90+1          all          Geographic objects support for \
> PostgreSQL -- documentation ii  postgresql-11-postgis-2.5            \
> 2.5.2+dfsg-1~exp1.pgdg90+1          amd64        Geographic objects support for \
> PostgreSQL 11 ii  postgresql-11-postgis-2.5-scripts    2.5.2+dfsg-1~exp1.pgdg90+1   \
> all          Geographic objects support for PostgreSQL 11 -- SQL scripts 
> 
> $ psql -d OSU -c "SELECT PostGIS_full_version();"
> postgis_full_version
> ------------------------------------------------------------------------------------ \
> -------------------------------------------------------------------------------------------
>  POSTGIS="2.5.2 r17328" GEOS="3.5.1-CAPI-1.9.1 r4246" PROJ="Rel. 4.9.3, 15 August \
> 2016" GDAL="GDAL 2.1.2, released 2016/10/24" LIBXML="2.9.4" LIBJSON="0.12.1" \
> TOPOLOGY RASTER 
> 
> And what is strange is that \dx gives version 2.1.3…
> whereas postgis_topology is ok
> why ??
> 
> $ psql -d OSU -c "\dx"
> List of installed extensions
> Name       | Version |   Schema   |                                    Description
> ------------------+---------+------------+-----------------------------------------------------------------------------------
>  postgis          | 2.1.3   | public     | PostGIS geometry, geography, and raster \
> spatial types and functions postgis_topology | 2.5.2   | topology   | PostGIS \
> topology spatial types and functions 
> 
> If I try to upgrade I obtain this error :
> $ psql -d OSU -c "ALTER EXTENSION postgis UPDATE;"
> ERROR:  function "st_union(geometry)" does not exist
> LINE 2:  WHERE oid = 'st_union(geometry)'::regprocedure AND proparal...
> ^
> QUERY:  UPDATE pg_proc SET proparallel = 's'
> WHERE oid = 'st_union(geometry)'::regprocedure AND proparallel = 'u'
> CONTEXT:  PL/pgSQL function inline_code_block line 5 at SQL statement
> 
> 
> 
> Anyone know how I can fix this version consistency issues and have a clean \
> installation ?? 
> Thank you for your help
> 
> Regards
> 
> Olivier
> 
> 
> 
> -----
> Olivier Lobry
> Ingénieur de Recherche
> Chargé du Système d'Information
> OSU OREME
> UMS 3282 CNRS - UMS 223 IRD
> www.oreme.org / data.oreme.org
> 
> _______________________________________________
> postgis-users mailing list
> postgis-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-users



-- 
Raúl Marín Rodríguez
carto.com
_______________________________________________
postgis-users mailing list
postgis-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/postgis-users


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic