[postgis-tickets] [PostGIS] #3956: Upgrade does not upgrade geog_brin_inclusion_add_value function to use the updated module
PostGIS
trac at osgeo.org
Mon Jan 8 18:53:45 PST 2018
#3956: Upgrade does not upgrade geog_brin_inclusion_add_value function to use the
updated module
-------------------------+---------------------------
Reporter: keiko713 | Owner: robe
Type: defect | Status: closed
Priority: medium | Milestone: PostGIS 2.4.3
Component: postgis | Version: 2.4.x
Resolution: worksforme | Keywords:
-------------------------+---------------------------
Comment (by keiko713):
Thanks a lot for taking a look this! Let me focus on the issue I'm seeing,
to avoid the complexity of pg_upgrade, so please forget about the Postgres
version upgrade here.
Here is an easy way to reproduce this issue.
0. using Postgres 9.6
1. install Postgis 2.3.3 (used apt-get install postgresql-9.6-postgis-2.3
postgresql-9.6-postgis-2.3-scripts)
2. `CREATE EXTENSION postgis`
{{{
gisdb=# SELECT postgis_full_version() || ' ' || version();
?column?
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-----------------
POSTGIS="2.3.3 r15473" GEOS="3.4.2-CAPI-1.8.2 r3921" PROJ="Rel. 4.8.0, 6
March 2012" GDAL="GDAL 1.10.1, released 2013/08/26" LIBXML="2.9.1"
LIBJSON="0.11.99" RASTER PostgreSQL 9.6.6 on x86_64-pc-linux-gnu, compiled
by gcc (Debian 4.9.2-1
0) 4.9.2, 64-bit
}}}
3. install postgis 2.4 (used apt-get install postgresql-9.6-postgis-2.4
postgresql-9.6-postgis-2.4-scripts)
4. `ALTER EXTENSION postgis UPDATE`
{{{
gisdb=# SELECT postgis_full_version() || ' ' || version();
?column?
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
----------------------------
POSTGIS="2.4.2 r16113" PGSQL="96" GEOS="3.4.2-CAPI-1.8.2 r3921"
PROJ="Rel. 4.8.0, 6 March 2012" GDAL="GDAL 1.10.1, released 2013/08/26"
LIBXML="2.9.1" LIBJSON="0.11.99" RASTER PostgreSQL 9.6.6 on x86_64-pc-
linux-gnu, compiled by gcc (Deb
ian 4.9.2-10) 4.9.2, 64-bit
}}}
5. `geog_brin_inclusion_add_value` is still pointing 2.3
{{{
gisdb=# select proname, prosrc, probin from pg_proc where probin like
'%postgis%' and probin not like '%postgis-2.4';
proname | prosrc |
probin
-------------------------------+-------------------------------+---------------------
geog_brin_inclusion_add_value | geog_brin_inclusion_add_value |
$libdir/postgis-2.3
(1 row)
}}}
The problem here is, the database at the point step 2 has operators and
things like that already (because it's created as Postgres 9.5+ and
Postgis 2.3), therefore it won't go inside of `IF` statement and the
binary reference never be updated. I would assume that when Postgis is
updated from 2.3 to 2.4, all binary reference would point to 2.4 as well.
As you can see above, `geog_brin_inclusion_add_value` is the only function
that is not updated in fact.
Does this make sense? Happy to explain more or testing out things. In the
meantime, I'll see if I can work on the patch.
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/3956#comment:7>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-tickets
mailing list