[postgis-tickets] [SCM] PostGIS branch master updated. 3.3.0rc2-748-g705fc8743
git at osgeo.org
git at osgeo.org
Thu May 4 08:23:57 PDT 2023
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 705fc8743543779e6d74014a681249e0ccbdc129 (commit)
via 1d263dc2ee69514f67afb1f8115877329aad13a7 (commit)
from 495b926e31f0bbef0980da4130f2e14fbdf911ab (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 705fc8743543779e6d74014a681249e0ccbdc129
Author: Sandro Santilli <strk at kbt.io>
Date: Thu May 4 17:17:06 2023 +0200
Tweak interrupt_relate test to catch interruption in ST_Intersects
That function became very fast so the result was obtained before
reaching the statement timeout time
diff --git a/regress/core/interrupt_relate.sql b/regress/core/interrupt_relate.sql
index 0fd2b4767..466baa867 100644
--- a/regress/core/interrupt_relate.sql
+++ b/regress/core/interrupt_relate.sql
@@ -1,3 +1,5 @@
+set client_min_messages to WARNING;
+
CREATE TEMPORARY TABLE _time AS SELECT now() t;
CREATE FUNCTION _timecheck(label text, tolerated interval) RETURNS text
@@ -50,7 +52,9 @@ SELECT _timecheck('crosses', '200ms');
select ST_Equals(g,st_reverse(g)) from _inputs WHERE id = 1; -- 6+ seconds
SELECT _timecheck('equals', '200ms');
-select ST_Intersects(g,g) from _inputs WHERE id = 1; -- 6+ seconds
+-- 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
SELECT _timecheck('intersects', '200ms');
select ST_Overlaps(g,g) from _inputs WHERE id = 1; -- 6+ seconds
@@ -60,3 +64,4 @@ select ST_Relate(g,g) from _inputs WHERE id = 1; -- 6+ seconds
SELECT _timecheck('relate', '200ms');
DROP FUNCTION _timecheck(text, interval);
+DROP TABLE _inputs;
commit 1d263dc2ee69514f67afb1f8115877329aad13a7
Author: Sandro Santilli <strk at kbt.io>
Date: Thu May 4 17:21:24 2023 +0200
Let PostgreSQL write the interruption error message
Closes #5365
Reverts 17708aa3c2
diff --git a/postgis/lwgeom_geos.h b/postgis/lwgeom_geos.h
index 2fb5cf93c..3f8d24519 100644
--- a/postgis/lwgeom_geos.h
+++ b/postgis/lwgeom_geos.h
@@ -57,10 +57,7 @@ uint32_t array_nelems_not_null(ArrayType* array);
*/
#define HANDLE_GEOS_ERROR(label) \
{ \
- if (strstr(lwgeom_geos_errmsg, "InterruptedException")) \
- ereport(ERROR, \
- (errcode(ERRCODE_QUERY_CANCELED), errmsg("canceling statement due to user request"))); \
- else \
+ if (!strstr(lwgeom_geos_errmsg, "InterruptedException")) \
lwpgerror("%s: %s", (label), lwgeom_geos_errmsg); \
PG_RETURN_NULL(); \
}
-----------------------------------------------------------------------
Summary of changes:
postgis/lwgeom_geos.h | 5 +----
regress/core/interrupt_relate.sql | 7 ++++++-
2 files changed, 7 insertions(+), 5 deletions(-)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list