1.查下超过10 s的查询语句
select * From pg_stat_activity where query_start<=now()- interval‘10 sec‘ and state not in (‘idle‘) and pid<>pg_backend_pid() and query ilike ‘select%‘ order by query_start ;
2. 超过10s的查询会被干掉
select pg_terminate_backend(pid) From pg_stat_activity where query_start<=now()- interval‘10 sec‘ and state not in (‘idle‘) and pid<>pg_backend_pid() and query ilike ‘select%‘ order by query_start ;
wenji发布的那些文档要找时间多看看了