rails-pg-extras 4.9.0 → 4.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cefaae16c6d92e4b1bd9af3d7b1dea9d1d0eb0a25079abb0d84e231ecb66ff31
4
- data.tar.gz: fae04146f9c957bbd1eb530712aed98ad9fbcc82dd6c9103b740cda5f8598c11
3
+ metadata.gz: 1a067baaa71cfde9501323c19331bde5cb0b20c41c4e1762b2f901451adc9bcc
4
+ data.tar.gz: ef322f5e9e3140533cde9b50c919cfba1aea8c86bd23dc2711351b65330b691f
5
5
  SHA512:
6
- metadata.gz: 2485ffb0a15f39c3459f97a778ec13a407e3b5c5a7a9b54892502a475856cb46bad649c1f2abd99cf25fda038c0fed57d086583032433ccc9b70505ee1cade78
7
- data.tar.gz: a169a25a29e1eaf614ef00d90ffb43025103edcda957b77fd1585fa19a5c9a4f7b96e9fb30270a2aaa391b7d90e6504a96af3396fd4c7a473011e87565b683be
6
+ metadata.gz: c07b9751224c026e24e2d3324995aacad8bf24ede16623203e5b19a6f895846354bee63ef9397cedf99c9a3d29d52ebd04af3273573581fb2d37c51db8016216
7
+ data.tar.gz: 4894354620c288a57fa7c7f22e5d17809eefeffd7698f26f8c13052c914c7a9164c4da11372d6b1650fa8e42f1b9b060dc6fcf5c591a029455c386ecf4759319
data/README.md CHANGED
@@ -630,6 +630,16 @@ RailsPgExtras.kill_all
630
630
 
631
631
  This commands kills all the currently active connections to the database. It can be useful as a last resort when your database is stuck in a deadlock.
632
632
 
633
+ ### `kill_pid`
634
+
635
+ ```ruby
636
+
637
+ RailsPgExtras.kill_pid(args: { pid: 4657 })
638
+
639
+ ```
640
+
641
+ This commands kills currently active database connection by its `pid` number. You can use `connections` method to find the correct `pid` values.
642
+
633
643
  ### `pg_stat_statements_reset`
634
644
 
635
645
  ```ruby
@@ -669,6 +679,24 @@ $ rake pg_extras:extensions
669
679
 
670
680
  This command lists all the currently installed and available PostgreSQL extensions.
671
681
 
682
+ ### `connections`
683
+
684
+ ```ruby
685
+
686
+ RailsPgExtras.connections
687
+
688
+ +-----------------------------------------------------+
689
+ | Returns the list of all active database connections |
690
+ +-----------------+----------------+------------------+
691
+ | username | client_address | application_name |
692
+ +-----------------+----------------+------------------+
693
+ | postgres | 172.19.0.1/32 | psql |
694
+ | postgres | 172.19.0.1/32 | irb |
695
+ +-----------------+----------------+------------------+
696
+ ```
697
+
698
+ This command returns the list of all active database connections.
699
+
672
700
  ### mandelbrot
673
701
 
674
702
  ```ruby
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsPgExtras
4
- VERSION = "4.9.0"
4
+ VERSION = "4.12.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-pg-extras
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.9.0
4
+ version: 4.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - pawurb
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-08-18 00:00:00.000000000 Z
11
+ date: 2022-11-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ruby-pg-extras
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 4.9.0
19
+ version: 4.12.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 4.9.0
26
+ version: 4.12.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rails
29
29
  requirement: !ruby/object:Gem::Requirement