Opened 10 years ago
Closed 10 years ago
#2893 closed enhancement (fixed)
ST_Segmentize is not interruptible
Reported by: | zenitram | Owned by: | strk |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS 2.2.0 |
Component: | postgis | Version: | 2.1.x |
Keywords: | Cc: |
Description
This query:
SELECT ST_Segmentize(ST_MakeLine(ST_MakePoint(4,39), ST_MakePoint(1,41)), 1e-100);
is not interruptible and doesn't get killed by the statement_timeout or manual cancellation requests.
I'm using this version:
POSTGIS="2.1.3 r12547" GEOS="3.4.2-CAPI-1.8.2 r3921" PROJ="Rel. 4.8.0, 6 March 2012" GDAL="GDAL 1.10.1, released 2013/08/26" LIBXML="2.7.8" LIBJSON="UNKNOWN" RASTER
Change History (10)
comment:1 by , 10 years ago
Owner: | changed from | to
---|
comment:2 by , 10 years ago
Milestone: | PostGIS 2.1.4 → PostGIS 2.2.0 |
---|---|
Type: | defect → enhancement |
comment:3 by , 10 years ago
Doesn't require too much rearrangement of code base. We do support interruptability of ANALYZE, for example.
comment:4 by , 10 years ago
Milestone: | PostGIS 2.2.0 → PostGIS 2.1.4 |
---|
Okay since it doesn't require an API change we could push into next 2.1 release. I'll flip to 2.1 then.
comment:5 by , 10 years ago
strk would this apply for geography as well? (and would it be limited to just ST_Segmentize or all our liblwgeom native funcs?). We might need to change this ticket title if so.
comment:6 by , 10 years ago
Nn a second though, while this change does not affect the SQL api, it would affect the liblwgeom one. Not sure what the target would be anyway.
comment:8 by , 10 years ago
Status: | new → assigned |
---|
I hadn't checked geography but I'd guess it would possibly affect all liblwgeom functions. Generally, it takes a liblwgeom enhancement to be able to provide an interruptability call. I'm on it.
comment:9 by , 10 years ago
r13099 (in trunk) adds interruptability API to liblwgeom and its usage from postgis module. I'll move on to hook ST_Segmentize code onto the new API. Any other long-running code should be checked for being interruptable, or hooked on the API too.
comment:10 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
r13105 makes use of the interruptibility API (extended) from PostGIS's ST_Segmentize function, fixing this ticket.
The geography version seems to fail earlier, with this message: ERROR: invalid memory alloc request size 1073741824
This is actually an enhancement as strk noted in #1802. We don't currently support interruptablility of built-in functions (just GEOS ones). Pushing to 2.2. We can try to do in 2.1 if it doesn't require too much rearrangement of the code base.