[PostGIS] #5648: postgis_raster upgrade fails on PG16

PostGIS trac at osgeo.org
Tue Dec 19 08:00:06 PST 2023


#5648: postgis_raster upgrade fails on PG16
----------------------+---------------------------
 Reporter:  rdunklau  |      Owner:  pramsey
     Type:  defect    |     Status:  new
 Priority:  medium    |  Milestone:  PostGIS 3.4.2
Component:  postgis   |    Version:  3.4.x
 Keywords:            |
----------------------+---------------------------
 postgis_raster upgrade fails on PG16 with the error message:

 {{{
 ERROR: attempt to redefine parameter "postgis.gdal_datapath"
 }}}

 This comes from the implementation of postgis_guc_find_option for PG16,
 which passes a random address instead of the GUC name.

 Here is a real simple patch fixing that:

 {{{

 diff --git a/libpgcommon/lwgeom_pg.c b/libpgcommon/lwgeom_pg.c
 index 6af4bea39..f7f848adc 100644
 --- a/libpgcommon/lwgeom_pg.c
 +++ b/libpgcommon/lwgeom_pg.c
 @@ -521,7 +521,7 @@ postgis_guc_find_option(const char *name)
          * the name field is first in config_generic.
          */
  #if POSTGIS_PGSQL_VERSION >= 160
 -       res = (struct config_generic **) find_option((void *) &key, false,
 true, ERROR);
 +       res = (struct config_generic **) find_option((void *) name, false,
 true, ERROR);
  #else
         res = (struct config_generic **) bsearch((void *) &key,
                  (void *) get_guc_variables(),
 --
 2.43.0

 }}}
-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5648>
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