Skip to content

Commit

Permalink
Replace waiting column with wait_event_type and wait_event
Browse files Browse the repository at this point in the history
The pg_stat_activity view changed in PG 9.6

Fixes ManageIQ#13200
  • Loading branch information
carbonin committed Feb 19, 2019
1 parent 25f2e3d commit b93ef85
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/extensions/ar_adapter/ar_dba.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ def client_connections
SELECT client_addr AS client_address
, datname AS database
, pid AS spid
, waiting AS is_waiting
, wait_event_type
, wait_event
, query
FROM pg_stat_activity
ORDER BY 1, 2
Expand Down
2 changes: 1 addition & 1 deletion spec/models/vmdb_database_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
connections = described_class.report_client_connections
expect(connections).to be_kind_of(Array)

expected_keys = ["client_address", "database", "spid", "is_waiting", "query"]
expected_keys = ["client_address", "database", "spid", "wait_event_type", "wait_event", "query"]
expect(connections.first.keys).to match_array(expected_keys)

expect(connections.first['spid']).to be_kind_of(Integer)
Expand Down

0 comments on commit b93ef85

Please sign in to comment.