Skip to content

Commit

Permalink
Fixed lines length
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleksey Krisenkov committed Apr 29, 2017
1 parent 07946a5 commit ee1f95b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/collectors/postgres/postgres.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,15 +431,17 @@ class ConnectionStateStats(QueryStats):
LEFT JOIN
(SELECT CASE WHEN wait_event IS NOT NULL THEN 'waiting'
WHEN state= 'idle' THEN 'idle'
WHEN state= 'idle in transaction' THEN 'idletransaction'
WHEN state= 'idle in transaction'
THEN 'idletransaction'
WHEN state = 'active' THEN 'active'
ELSE 'unknown' END AS state,
count(*) AS count
FROM pg_stat_activity
WHERE pid != pg_backend_pid()
GROUP BY CASE WHEN wait_event IS NOT NULL THEN 'waiting'
WHEN state= 'idle' THEN 'idle'
WHEN state= 'idle in transaction' THEN 'idletransaction'
WHEN state= 'idle in transaction'
THEN 'idletransaction'
WHEN state = 'active' THEN 'active'
ELSE 'unknown' END
) AS tmp2
Expand Down

0 comments on commit ee1f95b

Please sign in to comment.