Search Postgresql Archives

Cannot terminate backend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

 

I have a long running query that I seem unable to either cancel or terminate.

What could be the reason for this, and what is the bet way to terminate this kind of query ?

 

The query is a CTE using postgis ST_ClusterDBSCAN function. The CTE returns approximately 150k rows.
The SQL is as follows :


EXPLAIN ANALYZE
WITH subq AS (
        SELECT id, geom, ST_ClusterDBSCAN(geom, eps := 1000, minpoints := 1) OVER() AS cluster_id

        FROM mytable

)

SELECT cluster_id, count(id), ST_Collect(geom) 
FROM subq
GROUP BY cluster_id;
 

pg_stat_activity show no wait event.

pg_cancel_backend(mypid) returns true but the state does not change in pg_stat_activity.

pg_terminate_backend(mypid) yields the same result (as superuser)

Pg_stat_activity show no wait_event.

 

SELECT version();
PostgreSQL 14.5 (Ubuntu 14.5-1.pgdg20.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0, 64-bit

 

 

Any idea ? Thanks a lot !

 

Regards

Arnaud


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux