[postgis-users] Query postgis GUC variables on a new connection
Paul Ramsey
pramsey at cleverelephant.ca
Sun Oct 27 15:52:37 PDT 2019
Until the library loads the system doesn’t know about the GUCs. And querying the GUCs doesn’t for a library load (the system doesn’t having a binding from GUC to library). Querying a function, on the other hand, forces a load.
If this really annoys you, add postgis_raster.so to the ld_preload config in postgresql.conf.
P
> On Oct 27, 2019, at 10:25 AM, Jorge Gustavo Rocha <jgr at di.uminho.pt> wrote:
>
> Hi,
>
> When I connect to a database, I can not query the postgis GUC variables
> postgis.enable_outdb_rasters or postgis.gdal_enabled_drivers.
>
> $ psql service=geotuga
> psql (11.4 (Ubuntu 11.4-1.pgdg18.10+1))
> SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, bits:
> 256, compression: off)
>
> localhost:5432 geobox at geotuga=# show postgis.gdal_enabled_drivers;
> ERROR: 42704: unrecognized configuration parameter
> "postgis.gdal_enabled_drivers"
> LOCATION: GetConfigOptionByName, guc.c:8342
> localhost:5432 geobox at geotuga=# show postgis.enable_outdb_rasters;
> ERROR: 42704: unrecognized configuration parameter
> "postgis.enable_outdb_rasters"
> LOCATION: GetConfigOptionByName, guc.c:8342
> localhost:5432 geobox at geotuga=#
>
> But if I run ST_GDALDrivers(), afterwards the variables can be queried.
>
> $ psql service=geotuga
> psql (11.4 (Ubuntu 11.4-1.pgdg18.10+1))
> SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, bits:
> 256, compression: off)
>
> localhost:5432 geobox at geotuga=# SELECT short_name FROM ST_GDALDrivers()
> LIMIT 1;
> short_name
> ------------
> VRT
>
> localhost:5432 geobox at geotuga=# show postgis.enable_outdb_rasters;
> postgis.enable_outdb_rasters
> ------------------------------
> on
>
> localhost:5432 geobox at geotuga=# show postgis.gdal_enabled_drivers;
> postgis.gdal_enabled_drivers
> ------------------------------
> ENABLE_ALL
>
> My question is: aren't these variables already assigned? Why only after
> ST_GDALDrivers() call are these variables defined?
>
> Best regards
>
> Jorge Gustavo
> --
> Jorge Gustavo Rocha
> Departamento de Informática
> Universidade do Minho
> 4710-057 Braga
> Gabinete 3.29 (Piso 3)
> Tel: +351 253604480
> Fax: +351 253604471
> Móvel: +351 910333888
> skype: nabocudnosor
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-users
More information about the postgis-users
mailing list