[SCM] PostGIS branch master updated. 3.7.0beta1-166-g28528f2b7a
git at osgeo.org
git at osgeo.org
Sat Aug 1 22:33:28 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 28528f2b7a1cbb6e9b06be3c6422b00db0722b46 (commit)
from 263a3dbf965755f09b4f0a3aecc367b131641240 (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 28528f2b7a1cbb6e9b06be3c6422b00db0722b46
Author: Regina Obe <lr at pcorp.us>
Date: Sun Aug 2 01:31:59 2026 -0400
Add regress tests and news for geometry_columns speed issue
References #6110 for PostGIS 3.7.0
diff --git a/NEWS b/NEWS
index 2269a09052..08d1623765 100644
--- a/NEWS
+++ b/NEWS
@@ -35,6 +35,7 @@ These are only changes since 3.7.0beta1.
geometry data (Darafei Praliaskouski)
- GT-564, Avoid ST_MakePolygon failures with NULL hole array entries
(Darafei Praliaskouski)
+ - #6110, regression in speed with geometry_columns
* Enhancements *
diff --git a/regress/core/tickets.sql b/regress/core/tickets.sql
index fd03131cee..84525a6f9e 100644
--- a/regress/core/tickets.sql
+++ b/regress/core/tickets.sql
@@ -1813,3 +1813,56 @@ SELECT '#5357', ST_AsText(ST_LineFromEncodedPolyline('__nphBgcoeiA?@', 6), 6);
SELECT 'makepolygon-null-holes', ST_NPoints(ST_MakePolygon(
'LINESTRING ZM (0 0 0 0,0 1 0 0,1 1 0 0,0 0 0 0)'::geometry,
ARRAY[NULL::geometry]));
+
+-- -------------------------------------------------------------------------------------
+-- #6110, geometry_columns view should be fast even with many spatial tables
+CREATE SCHEMA test6110;
+
+CREATE FUNCTION test6110_check() RETURNS text AS $$
+DECLARE
+ t0 timestamptz;
+ t1 timestamptz;
+ elapsed interval;
+ n bigint;
+ tolerance interval;
+BEGIN
+ tolerance := interval '2 seconds' * COALESCE(
+ NULLIF(current_setting('test.executor_slow_factor', true), ''), '1'
+ )::double precision;
+
+ SELECT count(*) INTO n FROM geometry_columns
+ WHERE f_table_schema = 'test6110';
+ IF n <> 1000 THEN
+ RETURN 'FAIL: count=' || n || ' (expected 1000)';
+ END IF;
+
+ t0 := clock_timestamp();
+ SELECT count(*) INTO n FROM geometry_columns
+ WHERE f_table_schema = 'test6110';
+ t1 := clock_timestamp();
+ elapsed := t1 - t0;
+
+ RAISE LOG 'geometry_columns count of test6110 took % (rows=%)', elapsed, n;
+ IF elapsed > tolerance THEN
+ RETURN 'FAIL: count took ' || elapsed || ' > ' || tolerance;
+ END IF;
+ RETURN 'PASS';
+END;
+$$ LANGUAGE plpgsql;
+
+DO $$
+DECLARE i integer;
+BEGIN
+ FOR i IN 1..500 LOOP
+ EXECUTE format('CREATE TABLE test6110.typmod_%s (geom geometry(Point, 4326))', i);
+ EXECUTE format('CREATE TABLE test6110.constraint_%s (id integer)', i);
+ EXECUTE format('SELECT AddGeometryColumn(%L, %L, %L, 4326, %L, 2, false)',
+ 'test6110', 'constraint_' || i, 'geom', 'POINT');
+ END LOOP;
+END
+$$;
+
+SELECT '#6110', test6110_check();
+
+DROP FUNCTION test6110_check();
+DROP SCHEMA test6110 CASCADE;
diff --git a/regress/core/tickets_expected b/regress/core/tickets_expected
index f6b6ec305c..9cc8aefd9a 100644
--- a/regress/core/tickets_expected
+++ b/regress/core/tickets_expected
@@ -526,3 +526,4 @@ public|test5978|shape|2|4326|POINT
1|01030000209713000000000000
#5357|LINESTRING(38.903876 55.336448,38.903875 55.336448)
makepolygon-null-holes|4
+#6110|PASS
-----------------------------------------------------------------------
Summary of changes:
NEWS | 1 +
regress/core/tickets.sql | 53 +++++++++++++++++++++++++++++++++++++++++++
regress/core/tickets_expected | 1 +
3 files changed, 55 insertions(+)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list