[SCM] PostGIS branch stable-3.6 updated. 3.6.4-108-ga740a246ac
git at osgeo.org
git at osgeo.org
Mon Aug 3 09:46:54 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, stable-3.6 has been updated
via a740a246aca10d8ab5d07e56889e3b4c8b2833b0 (commit)
via 355aa8ae85f88c2048ae26b1558d9d31f145c98b (commit)
from 36241ae1809fd6335c22fbff12785720d05f3997 (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 a740a246aca10d8ab5d07e56889e3b4c8b2833b0
Merge: 36241ae180 355aa8ae85
Author: Darafei Praliaskouski <komzpa at gmail.com>
Date: Mon Aug 3 09:46:52 2026 -0700
Merge pull request 'regress: compare interrupt timing to local baseline (stable-3.6)' (!664) from Komzpa/postgis:fix/interrupt-baseline-3.6-20260803 into stable-3.6
`stable-3.5` went red today on `regress/core/interrupt_relate`:
```
-relate interrupted on time
+relate interrupted late: 00:00:00.75175 (00:00:00.22 tolerated)
```
Nothing was slow to cancel — the interrupt arrived in **752 ms** against a hard-coded
tolerance, on a machine that was also running the rest of the suite. Master fixed this
in !619 by measuring an uninterrupted baseline on the same machine first and comparing
against that instead of a constant.
This branch has the same harness, and is not immune: it asserts `500ms` where 3.5
asserts `220ms`, and the run that broke 3.5 measured 752 ms — past 500 ms as well. It
is green only because it did not run at that moment.
This is `8d662dd22` cherry-picked. The one conflict is in
`regress/core/interrupt_relate.sql` and only over those literal tolerances, which the
master commit rewrites wholesale, so master's file is the resolution. The NEWS entry is
placed in this branch's current section and indentation.
One extra file here that 3.4 did not need: `regress/core/interrupt_buffer_expected` on
this branch still says `buffer interrupted`, while the new `_timecheck` prints
`buffer interrupted on time`. Without that line the backport would fail the test it is
meant to stabilise.
Reviewed-on: https://gitea.osgeo.org/postgis/postgis/pulls/664
commit 355aa8ae85f88c2048ae26b1558d9d31f145c98b
Author: Darafei Praliaskouski <me at komzpa.net>
Date: Wed Jul 29 02:19:22 2026 +0400
regress: compare interrupt timing to local baseline
(cherry picked from commit 8d662dd225659c5eee6ac932219cbe2ee7670624)
diff --git a/NEWS b/NEWS
index 26417e01b4..5cc20f5741 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,9 @@ PostGIS 3.6.5
* Fixes *
+- GT-619, Make interrupt regression tests compare timeout latency to
+ same-machine uninterrupted runtime, avoiding false failures under
+ slow CI load (Darafei Praliaskouski)
- GT-582, Make the computed-columns regression test assert the query plan
instead of racing two stopwatches, so it no longer fails at random under
CI load (Darafei Praliaskouski)
diff --git a/regress/core/interrupt.sql b/regress/core/interrupt.sql
index 78f30166e4..c9fc993b6a 100644
--- a/regress/core/interrupt.sql
+++ b/regress/core/interrupt.sql
@@ -17,4 +17,7 @@ SELECT _timecheck('segmentize', '300ms');
-- Not affected by old timeout
SELECT '1',ST_AsText(ST_Segmentize('LINESTRING(0 0,4 0)'::geometry, 2));
+DROP FUNCTION _timecheck(text);
DROP FUNCTION _timecheck(text, interval);
+DROP FUNCTION _timecheck_baseline(text);
+DROP FUNCTION _timecheck_start();
diff --git a/regress/core/interrupt_buffer.sql b/regress/core/interrupt_buffer.sql
index fd942e1e6d..204ecae936 100644
--- a/regress/core/interrupt_buffer.sql
+++ b/regress/core/interrupt_buffer.sql
@@ -29,3 +29,6 @@ SELECT _timecheck('buffer', '350ms');
SELECT '1', ST_NPoints(ST_Buffer('POINT(4 0)'::geometry, 2, 1));
DROP FUNCTION _timecheck(text, interval);
+DROP FUNCTION _timecheck(text);
+DROP FUNCTION _timecheck_baseline(text);
+DROP FUNCTION _timecheck_start();
diff --git a/regress/core/interrupt_buffer_expected b/regress/core/interrupt_buffer_expected
index 2e5b6dae29..f7004e0f77 100644
--- a/regress/core/interrupt_buffer_expected
+++ b/regress/core/interrupt_buffer_expected
@@ -1,3 +1,3 @@
ERROR: canceling statement due to statement timeout
-buffer interrupted
+buffer interrupted on time
1|5
diff --git a/regress/core/interrupt_relate.sql b/regress/core/interrupt_relate.sql
index 74703296b8..52ead29c39 100644
--- a/regress/core/interrupt_relate.sql
+++ b/regress/core/interrupt_relate.sql
@@ -6,7 +6,7 @@ SELECT 1::int as id, ST_Collect(g) g FROM (
ST_Point(cos(radians(x)),sin(radians(270-x))),
ST_Point(sin(radians(x)),cos(radians(60-x)))
) g
- FROM generate_series(1,720) x
+ FROM generate_series(1,1440) x
) foo
;
@@ -16,57 +16,124 @@ SELECT 1::int as id, ST_Collect(g) g FROM (
-- IM9 based predicates
-----------------------------
+DO $$
+BEGIN
+ PERFORM _timecheck_start();
+ PERFORM ST_Contains(g,g) FROM _inputs WHERE id = 1;
+ PERFORM _timecheck_baseline('contains');
+END;
+$$;
+
BEGIN;
SET LOCAL statement_timeout TO 100;
select ST_Contains(g,g) from _inputs WHERE id = 1; -- 6+ seconds
ROLLBACK;
-SELECT _timecheck('contains', '500ms');
+SELECT _timecheck('contains');
+
+DO $$
+BEGIN
+ PERFORM _timecheck_start();
+ PERFORM ST_Covers(g,g) FROM _inputs WHERE id = 1;
+ PERFORM _timecheck_baseline('covers');
+END;
+$$;
BEGIN;
SET LOCAL statement_timeout TO 100;
select ST_Covers(g,g) from _inputs WHERE id = 1; -- 6+ seconds
ROLLBACK;
-SELECT _timecheck('covers', '500ms');
+SELECT _timecheck('covers');
+
+DO $$
+BEGIN
+ PERFORM _timecheck_start();
+ PERFORM ST_CoveredBy(g,g) FROM _inputs WHERE id = 1;
+ PERFORM _timecheck_baseline('coveredby');
+END;
+$$;
BEGIN;
SET LOCAL statement_timeout TO 100;
select ST_CoveredBy(g,g) from _inputs WHERE id = 1; -- 6+ seconds
ROLLBACK;
-SELECT _timecheck('coveredby', '500ms');
+SELECT _timecheck('coveredby');
+
+DO $$
+BEGIN
+ PERFORM _timecheck_start();
+ PERFORM ST_Crosses(g,g) FROM _inputs WHERE id = 1;
+ PERFORM _timecheck_baseline('crosses');
+END;
+$$;
BEGIN;
SET LOCAL statement_timeout TO 100;
select ST_Crosses(g,g) from _inputs WHERE id = 1; -- 6+ seconds
ROLLBACK;
-SELECT _timecheck('crosses', '500ms');
+SELECT _timecheck('crosses');
+DO $$
+BEGIN
+ PERFORM _timecheck_start();
+ PERFORM ST_Equals(g,st_reverse(g)) FROM _inputs WHERE id = 1;
+ PERFORM _timecheck_baseline('equals');
+END;
+$$;
+
+BEGIN;
+SET LOCAL statement_timeout TO 100;
-- NOTE: we're reversing one of the operands to avoid the
-- short-circuit described in #3226
-BEGIN;
-SET LOCAL statement_timeout TO 100;
select ST_Equals(g,st_reverse(g)) from _inputs WHERE id = 1; -- 6+ seconds
ROLLBACK;
-SELECT _timecheck('equals', '500ms');
+SELECT _timecheck('equals');
+
+DO $$
+BEGIN
+ PERFORM _timecheck_start();
+ PERFORM ST_Intersects(g,ST_Segmentize(g,1e-4)) FROM _inputs WHERE id = 1;
+ PERFORM _timecheck_baseline('intersects');
+END;
+$$;
--- NOTE: intersects became very fast, so we segmentize
--- input to make it slower
BEGIN;
SET LOCAL statement_timeout TO 100;
+-- NOTE: intersects became very fast, so we segmentize
+-- input to make it slower
select ST_Intersects(g,ST_Segmentize(g,1e-4)) from _inputs WHERE id = 1; -- 6+ seconds
ROLLBACK;
-SELECT _timecheck('intersects', '500ms');
+SELECT _timecheck('intersects');
+
+DO $$
+BEGIN
+ PERFORM _timecheck_start();
+ PERFORM ST_Overlaps(g,g) FROM _inputs WHERE id = 1;
+ PERFORM _timecheck_baseline('overlaps');
+END;
+$$;
BEGIN;
SET LOCAL statement_timeout TO 100;
select ST_Overlaps(g,g) from _inputs WHERE id = 1; -- 6+ seconds
ROLLBACK;
-SELECT _timecheck('overlaps', '500ms');
+SELECT _timecheck('overlaps');
+
+DO $$
+BEGIN
+ PERFORM _timecheck_start();
+ PERFORM ST_Relate(g,g) FROM _inputs WHERE id = 1;
+ PERFORM _timecheck_baseline('relate');
+END;
+$$;
BEGIN;
SET LOCAL statement_timeout TO 100;
select ST_Relate(g,g) from _inputs WHERE id = 1; -- 6+ seconds
ROLLBACK;
-SELECT _timecheck('relate', '500ms');
+SELECT _timecheck('relate');
+DROP FUNCTION _timecheck(text);
DROP FUNCTION _timecheck(text, interval);
+DROP FUNCTION _timecheck_baseline(text);
+DROP FUNCTION _timecheck_start();
DROP TABLE _inputs;
diff --git a/regress/utils/timecheck.sql b/regress/utils/timecheck.sql
index 08f2af7df8..e8b324603e 100644
--- a/regress/utils/timecheck.sql
+++ b/regress/utils/timecheck.sql
@@ -1,3 +1,21 @@
+CREATE FUNCTION _timecheck_start() RETURNS void
+AS $$
+BEGIN
+ UPDATE _time SET t = clock_timestamp();
+END;
+$$ LANGUAGE 'plpgsql' VOLATILE;
+
+CREATE FUNCTION _timecheck_baseline(label text) RETURNS void
+AS $$
+BEGIN
+ INSERT INTO _time_baseline
+ SELECT label, clock_timestamp() - t
+ FROM _time;
+
+ UPDATE _time SET t = clock_timestamp();
+END;
+$$ LANGUAGE 'plpgsql' VOLATILE;
+
CREATE FUNCTION _timecheck(label text, tolerated interval) RETURNS text
AS $$
DECLARE
@@ -33,6 +51,43 @@ BEGIN
END;
$$ LANGUAGE 'plpgsql' VOLATILE;
+CREATE FUNCTION _timecheck(label text) RETURNS text
+AS $$
+DECLARE
+ ret TEXT;
+ lap INTERVAL;
+ rec RECORD;
+BEGIN
+ -- We use now() here to get the time at the
+ -- start of the transaction, which started when
+ -- this function was called, so the earliest
+ -- possible time
+ SELECT now() - t lap, b.baseline, b.baseline * 0.9 tolerated
+ FROM _time t
+ JOIN _time_baseline b ON b.label = _timecheck.label
+ INTO rec;
+
+ RAISE DEBUG 'Uninterrupted baseline: %', rec.baseline;
+ RAISE DEBUG 'Resulting tolerance: %', rec.tolerated;
+
+ IF rec.lap < rec.tolerated THEN
+ ret := format(
+ '%s interrupted on time',
+ label
+ );
+ ELSE
+ ret := format(
+ '%s interrupted late: %s (%s tolerated)',
+ label, rec.lap, rec.tolerated
+ );
+ END IF;
+
+ UPDATE _time SET t = clock_timestamp();
+
+ RETURN ret;
+END;
+$$ LANGUAGE 'plpgsql' VOLATILE;
+
CREATE TEMPORARY TABLE _time AS
SELECT
now() t,
@@ -41,3 +96,7 @@ SELECT
'1'
)::float8 sf;
+CREATE TEMPORARY TABLE _time_baseline (
+ label text PRIMARY KEY,
+ baseline interval NOT NULL
+);
-----------------------------------------------------------------------
Summary of changes:
NEWS | 3 ++
regress/core/interrupt.sql | 3 ++
regress/core/interrupt_buffer.sql | 3 ++
regress/core/interrupt_buffer_expected | 2 +-
regress/core/interrupt_relate.sql | 93 +++++++++++++++++++++++++++++-----
regress/utils/timecheck.sql | 59 +++++++++++++++++++++
6 files changed, 149 insertions(+), 14 deletions(-)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list