Opened 10 months ago
Last modified 5 weeks ago
#5648 reopened defect
postgis_raster upgrade fails on PG16
Reported by: | rdunklau | Owned by: | robe |
---|---|---|---|
Priority: | blocker | Milestone: | PostGIS 3.3.8 |
Component: | raster | Version: | 3.4.x |
Keywords: | Cc: |
Description (last modified by )
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
One should probably remove the cast to (void *) while at it
Change History (13)
comment:1 by , 10 months ago
Component: | postgis → raster |
---|---|
Owner: | changed from | to
comment:2 by , 10 months ago
Description: | modified (diff) |
---|
comment:3 by , 10 months ago
comment:4 by , 10 months ago
Milestone: | PostGIS 3.4.2 → PostGIS 3.3.6 |
---|
comment:7 by , 10 months ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
comment:9 by , 10 months ago
I rolled back this change on master, cause it was breaking our upgrade tests and several raster tests (with can't change guc) as noted in #5650. The upgrade tests failing are more mysterious to me.
I also left a dangling variable key, but that was a separate issue which fixing that did not fix the underlying issue in #5650.
I'm still checking to see if it's our tests at fault here, cause looking at the definition in PostgreSQL code
struct config_generic * find_option(const char *name, bool create_placeholders, bool skip_errors, int elevel)
This code should have worked
comment:10 by , 10 months ago
Priority: | medium → blocker |
---|
comment:13 by , 5 weeks ago
Milestone: | PostGIS 3.3.6 → PostGIS 3.3.8 |
---|
In bfc8cd7/git: