ruby-pg-extras 2.1.0 → 2.2.0

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: a88ff7e79fc4b77781012f9ee52afeee2462dcc46177d6bec8d24885c9822526
4
- data.tar.gz: 9befdd7dd6f98195391fe323f5fabf0d74a6bb9bb0d717f7cf74c30219f91462
3
+ metadata.gz: 67ee92c7a3fefa174bf843ee90a6d0247968726dbddfa57d83e02bec80614b3c
4
+ data.tar.gz: '0893af856168f741cfe505c39415211b079202684e4472f38614f76bc6bfc7e2'
5
5
  SHA512:
6
- metadata.gz: 0c5df44798b60ae20ad1d8bb395cce56d92e89ddde8912d0a747fcf7e695c74ea3f9a58fa71b7d570a956d908ef3261bfc776c8feb23b21a7f61c595bc3a0855
7
- data.tar.gz: d8d2ddcc09c7127ff75b8897bbef5a4ad98f057c80e836bcf8849833c0580914bfd1fd3a435cce34ef4124458dcf0fb12b3dcdb1d78b6932bd629f0ddb90a2f5
6
+ metadata.gz: b63de82209cb9b52710c29360025058e88987ec14d48c5d59ab16f677512fab8d11f7042cd168358971b30421edf0910d59a69d082dc024440991cac5820ddf7
7
+ data.tar.gz: 4c9bd4431a96091ba6e5ba581ae7b7493a3b49d5329e0cd85903f90dbc13477e2d519a719ff078117b9e03a0b7dc89efb263eaafc3e458a4ff5ff6beb5e6fe23
data/README.md CHANGED
@@ -167,6 +167,20 @@ This method displays values for selected PostgreSQL settings. You can compare th
167
167
 
168
168
  [More info](https://pawelurbanek.com/postgresql-fix-performance#cache-hit)
169
169
 
170
+ ### 'ssl_used'
171
+
172
+ ```ruby
173
+
174
+ RubyPGExtras.ssl_used
175
+
176
+ | ssl_is_used |
177
+ +---------------------------------+
178
+ | t |
179
+
180
+ ```
181
+
182
+ Returns boolean indicating if an encrypted SSL is currently used. Connecting to the database via an unencrypted connection is a critical security risk.
183
+
170
184
  ### `index_usage`
171
185
 
172
186
  ```ruby
@@ -1,4 +1,4 @@
1
- /* Multiple indexes that have the same set of columns, same opclass, expression and predicate -- which make them equivalent. */
1
+ /* Multiple indexes that have the same set of columns, same opclass, expression and predicate. */
2
2
 
3
3
  SELECT pg_size_pretty(sum(pg_relation_size(idx))::bigint) as size,
4
4
  (array_agg(idx))[1] as idx1, (array_agg(idx))[2] as idx2,
@@ -0,0 +1,4 @@
1
+ /* Check if SSL connection is used */
2
+
3
+ CREATE EXTENSION IF NOT EXISTS sslinfo;
4
+ SELECT ssl_is_used();
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RubyPGExtras
4
- VERSION = "2.1.0"
4
+ VERSION = "2.2.0"
5
5
  end
@@ -16,7 +16,7 @@ module RubyPGExtras
16
16
  records_rank seq_scans table_indexes_size
17
17
  table_size total_index_size total_table_size
18
18
  unused_indexes duplicate_indexes vacuum_stats kill_all
19
- buffercache_stats buffercache_usage
19
+ buffercache_stats buffercache_usage ssl_used
20
20
  )
21
21
 
22
22
  DEFAULT_ARGS = Hash.new({}).merge({
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: 2.1.0
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - pawurb
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-10-15 00:00:00.000000000 Z
11
+ date: 2021-10-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg
@@ -106,6 +106,7 @@ files:
106
106
  - lib/ruby-pg-extras/queries/outliers_legacy.sql
107
107
  - lib/ruby-pg-extras/queries/records_rank.sql
108
108
  - lib/ruby-pg-extras/queries/seq_scans.sql
109
+ - lib/ruby-pg-extras/queries/ssl_used.sql
109
110
  - lib/ruby-pg-extras/queries/table_cache_hit.sql
110
111
  - lib/ruby-pg-extras/queries/table_indexes_size.sql
111
112
  - lib/ruby-pg-extras/queries/table_size.sql