ST_Distance for geography should be cancellable
|Reported by:||robe||Owned by:||pramsey|
Description (last modified by )
My server seems pretty frozen computing these and it's still trying to compute the distance between these two countries and it's been 15 minutes already.
After about 17 minutes of waiting I decided to just cancel the query and the query would not cancel even after 7 minutes of waiting. Then I tried to pg_terminate_backend it, and that still did not work. So I had to finally end up killing my service entirely.
I know they are big but really? I should at least be able to cancel.
We were testing on 2.2.1, but decided to also test on 2.1.8 (postgresql 9.4). Same issue on both.
Us has 36054 points and Russia has 36352
Query is as follows:
SELECT ST_Distance(a.geog, b.geog) FROM (SELECT geom::geography As geog, ST_NPoints(geom) As npoints FROM ur_test WHERE name = 'United States') AS a , (SELECT geom::geography AS geog, ST_NPoints(geom) As npoints FROM ur_test WHERE name = 'Russia') AS b
Casting to geography is quick. Doing distance on geometry I think was about 2 seconds.
Change History (10)
comment:4 by , 6 years ago
|Summary:||Getting distance between united States and Russia in geography hangs up the server → ST_Distance for geography should be cancellable|