Opened 5 months ago

Last modified 4 months ago

#5648 reopened defect

postgis_raster upgrade fails on PG16 — at Initial Version

Reported by: rdunklau Owned by: pramsey
Priority: blocker Milestone: PostGIS 3.3.6
Component: raster Version: 3.4.x
Keywords: Cc:

Description

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

Change History (0)

Note: See TracTickets for help on using tickets.