[postgis-tickets] [SCM] PostGIS branch main updated. 3.1.0rc1-281-g1735811

git at osgeo.org git at osgeo.org
Wed Jul 7 04:14:52 PDT 2021


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, main has been updated
       via  1735811117212c292740df7edc96414ee73f4b85 (commit)
      from  d71411caf5b122fc3595c6af3b925a17fc4de129 (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 1735811117212c292740df7edc96414ee73f4b85
Author: Sandro Santilli <strk at kbt.io>
Date:   Wed Jul 7 11:21:15 2021 +0200

    Hush ANALYZE against tables with no not-null geometries
    
    Turns a NOTICE into a DEBUG, and includes table namespace
    in the debug message, to be more useful.

diff --git a/postgis/gserialized_estimate.c b/postgis/gserialized_estimate.c
index b867ed7..4d3995e 100644
--- a/postgis/gserialized_estimate.c
+++ b/postgis/gserialized_estimate.c
@@ -1537,12 +1537,16 @@ compute_gserialized_stats_mode(VacAttrStats *stats, AnalyzeAttrFetchFunc fetchfu
 	/* If there's no useful features, we can't work out stats */
 	if ( ! notnull_cnt )
 	{
+#if POSTGIS_DEBUG_LEVEL > 0
 		Oid relation_oid = stats->attr->attrelid;
 		char *relation_name = get_rel_name(relation_oid);
-		elog(NOTICE,
-		     "PostGIS: Unable to compute statistics for \"%s.%s\": No non-null/empty features",
+		char *namespace = get_namespace_name(get_rel_namespace(relation_oid));
+		elog(DEBUG1,
+		     "PostGIS: Unable to compute statistics for \"%s.%s.%s\": No non-null/empty features",
+		     namespace ? namespace : "(NULL)",
 		     relation_name ? relation_name : "(NULL)",
 		     stats->attr->attname.data);
+#endif /* POSTGIS_DEBUG_LEVEL > 0 */
 		stats->stats_valid = false;
 		return;
 	}
diff --git a/regress/core/estimatedextent_expected b/regress/core/estimatedextent_expected
index 0cf866b..b25c0e6 100644
--- a/regress/core/estimatedextent_expected
+++ b/regress/core/estimatedextent_expected
@@ -44,5 +44,3 @@ NOTICE:  drop cascades to 2 other objects
 3.b null|
 4.a box|BOX(-100 -100,100 100)
 4.b box|BOX(-200 -200,200 200)
-NOTICE:  PostGIS: Unable to compute statistics for "test.geom1": No non-null/empty features
-NOTICE:  PostGIS: Unable to compute statistics for "test.geom2": No non-null/empty features

-----------------------------------------------------------------------

Summary of changes:
 postgis/gserialized_estimate.c        | 8 ++++++--
 regress/core/estimatedextent_expected | 2 --
 2 files changed, 6 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list