[SCM] PostGIS branch master updated. 3.7.0beta2-15-g9e382377b
git at osgeo.org
git at osgeo.org
Mon Aug 10 12:53:31 PDT 2026
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "PostGIS".
The branch, master has been updated
via 9e382377bc054c59b4ed4a0d8c431c82e2e86590 (commit)
via e26a9b50899b2475b964d4751b881279c0e613c0 (commit)
from 3e477a4cbce5e2823eebe4308ad31ceb02a17e5e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 9e382377bc054c59b4ed4a0d8c431c82e2e86590
Merge: 3e477a4cb e26a9b508
Author: Darafei Praliaskouski <komzpa at gmail.com>
Date: Mon Aug 10 12:53:30 2026 -0700
Merge pull request 'raster: keep GDAL diagnostics server-only' (!722) from Komzpa/postgis:fix/gdal-server-only-debug-20260810 into master
`postgis.gdal_cpl_debug` installed a GDAL error handler that forwarded redacted GDAL diagnostics through PostgreSQL client-visible `elog()` levels. Redaction is useful defense-in-depth, but GDAL/VSI diagnostics can contain URLs, headers, tokens, or local paths in forms that are hard to exhaustively denylist.
This keeps the detailed redacted GDAL diagnostic text in the server log with `LOG_SERVER_ONLY`, and changes client-visible NOTICE/DEBUG/WARNING/ERROR text to generic messages that point at the server log. The GUC documentation now describes that split explicitly.
Reviewed-on: https://gitea.osgeo.org/postgis/postgis/pulls/722
commit e26a9b50899b2475b964d4751b881279c0e613c0
Author: Darafei Praliaskouski <me at komzpa.net>
Date: Mon Aug 10 23:32:34 2026 +0400
raster: keep GDAL diagnostics server-only
diff --git a/doc/reference_guc.xml b/doc/reference_guc.xml
index bb44a67e1..d3e9c9b58 100644
--- a/doc/reference_guc.xml
+++ b/doc/reference_guc.xml
@@ -273,7 +273,7 @@ SET postgis.enable_outdb_rasters = False;
<refsection>
<title>Description</title>
<para>
- By default, GDAL logging is printed to stderr, and lower level debug messages are not printed at all. Turning this GUC to true will cause GDAL logging to be sent into the PostgreSQL logging stream, so you can see more or less of it by altering the <code>client_min_message</code> PostgreSQL GUC.
+ By default, GDAL logging is printed to stderr, and lower level debug messages are not printed at all. Turning this GUC to true will cause detailed GDAL logging to be sent into the PostgreSQL server log. PostgreSQL clients receive only generic GDAL notice, debug, warning, or error messages.
</para>
<para role="availability" conformance="3.6.0">Availability: 3.6.0</para>
diff --git a/raster/rt_pg/rtpg_gdal.c b/raster/rt_pg/rtpg_gdal.c
index fdc3333fd..d4de9cd11 100644
--- a/raster/rt_pg/rtpg_gdal.c
+++ b/raster/rt_pg/rtpg_gdal.c
@@ -1178,22 +1178,25 @@ ogrErrorHandler(CPLErr eErrClass, int err_no, const char* msg)
{
gdalErrType = gdalErrorTypes[err_no];
}
+
+ ereport(LOG_SERVER_ONLY, (errmsg_internal("GDAL %s [%d] %s", gdalErrType, err_no, redacted)));
+
switch (eErrClass)
{
case CE_None:
- elog(NOTICE, "GDAL %s [%d] %s", gdalErrType, err_no, redacted);
- break;
+ elog(NOTICE, "GDAL %s [%d] notice; see server log for details", gdalErrType, err_no);
+ break;
case CE_Debug:
- elog(DEBUG2, "GDAL %s [%d] %s", gdalErrType, err_no, redacted);
- break;
+ elog(DEBUG2, "GDAL %s [%d] debug message; see server log for details", gdalErrType, err_no);
+ break;
case CE_Warning:
- elog(WARNING, "GDAL %s [%d] %s", gdalErrType, err_no, redacted);
- break;
+ elog(WARNING, "GDAL %s [%d] warning; see server log for details", gdalErrType, err_no);
+ break;
case CE_Failure:
case CE_Fatal:
default:
- elog(ERROR, "GDAL %s [%d] %s", gdalErrType, err_no, redacted);
- break;
+ elog(ERROR, "GDAL %s [%d] error; see server log for details", gdalErrType, err_no);
+ break;
}
pfree(redacted);
return;
-----------------------------------------------------------------------
Summary of changes:
doc/reference_guc.xml | 2 +-
raster/rt_pg/rtpg_gdal.c | 19 +++++++++++--------
2 files changed, 12 insertions(+), 9 deletions(-)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list