From 168a219f3f8ff18aa2bd8512e132958244ed6a4a Mon Sep 17 00:00:00 2001 From: Colin Gagnaire Date: Fri, 26 Apr 2019 16:08:01 +0200 Subject: [PATCH] fix postgres querytime query --- database/postgres/mode/querytime.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/database/postgres/mode/querytime.pm b/database/postgres/mode/querytime.pm index 5c21da1ad..3224c170a 100644 --- a/database/postgres/mode/querytime.pm +++ b/database/postgres/mode/querytime.pm @@ -73,7 +73,7 @@ ORDER BY pgsa.query_start, pgsa.pid DESC }; } else { $query = q{ -SELECT pg_database.datname, pgsa.datid, pgsa.pid, pgsa.usename, pgsa.client_addr, pgsa.current_query AS current_query, '' AS state, +SELECT pg_database.datname, pgsa.datid, pgsa.procpid, pgsa.usename, pgsa.client_addr, pgsa.current_query AS current_query, '' AS state, CASE WHEN pgsa.client_port < 0 THEN 0 ELSE pgsa.client_port END AS client_port, COALESCE(ROUND(EXTRACT(epoch FROM now()-query_start)),0) AS seconds FROM pg_database LEFT JOIN pg_stat_activity pgsa ON pg_database.datname = pgsa.datname AND (pgsa.query_start IS NOT NULL AND current_query NOT LIKE '%')