In my simple PostGIS query to find the lengths of lines that fall within buffers (polygons)
SELECT a.name, b.route_id, ST_LENGTH(ST_Intersection(a.buffer, b.wkb_geometry))
FROM buffered a, lines b
WHERE ST_Intersects(a.buffer, b.wkb_geometry)
The query runs endlessly and when I send a cancel request, I am returned an error:
ERROR: Error performing intersection: InterruptedException: Interrupted!`
This query has worked with one table of lines, but does not work with another. How can one log the index of the problematic row(s) in order that they be later skipped or removed?