postgresql状态查询
postgresql状态查询
SELECT * FROM pg_stat_activity WHERE datname='ams' and waiting='t';
SELECT pg_stat_get_backend_pid(s.backendid) AS procpid,
pg_stat_get_backend_activity(s.backendid) AS current_query
FROM (SELECT pg_stat_get_backend_idset() AS backendid) AS s;
作者 gznofeng