Skip to content

Commit

Permalink
Fix connection query metric for PG 9.6 (#212) (#213)
Browse files Browse the repository at this point in the history
Co-authored-by: Keith Fiske <[email protected]>
  • Loading branch information
sharmay and keithf4 authored Nov 19, 2020
1 parent 8837e2a commit 197c1b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion exporter/postgres/queries_pg96.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ccp_connection_stats:
, idle_in_txn
, (select coalesce(extract(epoch from (max(now() - state_change))),0) from monitor.pg_stat_activity() where state = 'idle in transaction') as max_idle_in_txn_time
, (select coalesce(extract(epoch from (max(now() - query_start))),0) from monitor.pg_stat_activity() where state <> 'idle') as max_query_time
, (select coalesce(extract(epoch from (max(now() - query_start))),0) from pg_catalog.pg_stat_activity where backend_type = 'client backend' and wait_event_type = 'Lock' ) as max_blocked_query_time
, (select coalesce(extract(epoch from (max(now() - query_start))),0) from pg_catalog.pg_stat_activity where wait_event_type = 'Lock' ) as max_blocked_query_time
, max_connections
from (
select count(*) as total
Expand Down

0 comments on commit 197c1b3

Please sign in to comment.