ruby-pg-extras 5.2.1 → 5.2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 20d04a4adbd7ca17e382e967960df93f1be7f6aba25d2ec6e72ac68a7dfdf190
4
- data.tar.gz: b2053fb9ae80ea5726c866eb61c1aaa8755ec45fb259e2763387496ba0d99cb0
3
+ metadata.gz: 8998510423dd0947fd6b35f8f1ec5f0f2e5168ccbc56b82e46ac5044f356b74b
4
+ data.tar.gz: fe73a1a398bff83813a2a9337e8ecb892c6bc1fb9caaaf32ad739cbfcdb93519
5
5
  SHA512:
6
- metadata.gz: 03164aac5bb96d95a84bfd49cd1bd722f5e21fe00456bd3e27f835261e204c4217f88960834be870cd8380060a25b9c3cc5070ac3270662a06cc2bdd1f69ad57
7
- data.tar.gz: '0382f05ac851f45db8c11272334e49326448b1bd30ef2b68009965d88bf222a497c91c4c8c34d4891c9010a238ade3da9d071e9e8151e9241f21b37b46c385b6'
6
+ metadata.gz: 1f2541ba5926678e683d4f5402ae4b3845be554c350b64cb378c9cdf11e2b14ad6f620bb758ee7e5c8aa943abfb969eaef7d3d5ea0c1ed7efc8acb89863972b6
7
+ data.tar.gz: 58b6eaf77c38ae3e21793a32d10cd86118a697d4bc5dd8ced29465a87cd9b73b5c2f7095a671fed93df2268880423213c6926c057cc0ea0a51edc4c67f65391e
data/README.md CHANGED
@@ -106,7 +106,7 @@ The simplest way to start using pg-extras is to execute a `diagnose` method. It
106
106
  RubyPgExtras.diagnose
107
107
  ```
108
108
 
109
- ![Diagnose report](https://github.com/pawurb/ruby-pg-extras/raw/master/ruby-pg-extras-diagnose.png)
109
+ ![Diagnose report](https://github.com/pawurb/ruby-pg-extras/raw/main/ruby-pg-extras-diagnose.png)
110
110
 
111
111
  Keep reading to learn about methods that `diagnose` uses under the hood.
112
112
 
@@ -32,6 +32,7 @@ module RubyPgExtras
32
32
  calls_legacy: { limit: 10 },
33
33
  long_running_queries: { threshold: "500 milliseconds" },
34
34
  locks: { limit: 20 },
35
+ blocking: { limit: 20 },
35
36
  outliers: { limit: 10 },
36
37
  outliers_legacy: { limit: 10 },
37
38
  buffercache_stats: { limit: 10 },
@@ -5,7 +5,8 @@ SELECT bl.pid AS blocked_pid,
5
5
  now() - ka.query_start AS blocking_duration,
6
6
  kl.pid AS blocking_pid,
7
7
  a.query AS blocked_statement,
8
- now() - a.query_start AS blocked_duration
8
+ now() - a.query_start AS blocked_duration,
9
+ a.application_name AS application
9
10
  FROM pg_catalog.pg_locks bl
10
11
  JOIN pg_catalog.pg_stat_activity a
11
12
  ON bl.pid = a.pid
@@ -13,4 +14,6 @@ JOIN pg_catalog.pg_locks kl
13
14
  JOIN pg_catalog.pg_stat_activity ka
14
15
  ON kl.pid = ka.pid
15
16
  ON bl.transactionid = kl.transactionid AND bl.pid != kl.pid
16
- WHERE NOT bl.granted;
17
+ WHERE NOT bl.granted
18
+ ORDER BY blocked_duration
19
+ LIMIT %{limit};
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RubyPgExtras
4
- VERSION = "5.2.1"
4
+ VERSION = "5.2.3"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-pg-extras
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.2.1
4
+ version: 5.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - pawurb
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-03-01 00:00:00.000000000 Z
11
+ date: 2023-06-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg