rails-pg-extras 1.0.0 → 1.1.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: 9b6b163cd88218757306517d2a4c25bb13c200464d41fbb4bc8c82f9831b4879
4
- data.tar.gz: e1de0a513ba7833332f62b052d565367844d92726de14bbac7dcd75a0d7358ed
3
+ metadata.gz: 780e5bd6ea4fb796ff83e4e249ac603ae7a74bf4a11d6e7414a72f82a433926c
4
+ data.tar.gz: 3499bfe705e3bcde82fa4b6417cbd275d3c9cbea6f57b03db384a3b370323020
5
5
  SHA512:
6
- metadata.gz: c8763536e9e1ec169155f48cf962c977f095e94b203d3930d491bb997725d8ab044d3df115dc1aa5a8e97fd1afe2fa180c9ec5c9c5a1fa010655288d5a0f8ea1
7
- data.tar.gz: ae3d6fbabded46a62bf7ca32b01efe8bb48273d27a31296a578f6ff338384626c810e2a0cc4c57076834b057e0b42e17601f030d74647eea0cb59cd50c4bc923
6
+ metadata.gz: a790f7359529dc48fce3ae4632742565a0de41b4d9463c419a1cd676361a40fed66f26e84e0d19611f466b533f67927813747a05d5e2d517b348e6be04bc5843
7
+ data.tar.gz: 5bb4bf5375df56cb3a48338e6e785cc9dd11d9859ab7c6290e5367c84b390f8c4433131920854f8fcc188df20f1bf55542c807d15a3bb3eee32d62a9888ec652
data/README.md CHANGED
@@ -6,15 +6,15 @@ Included rake tasks and Ruby methods can be used to obtain information about a P
6
6
 
7
7
  Not using Rails? Check out the core dependency [pure Ruby version](https://github.com/pawurb/ruby-pg-extras).
8
8
 
9
- ### Installation
9
+ ## Installation
10
10
 
11
11
  In your Gemfile
12
12
 
13
13
  ```ruby
14
- gem 'rails-pg-extras'
14
+ gem "rails-pg-extras"
15
15
  ```
16
16
 
17
- ### Usage
17
+ ## Usage
18
18
 
19
19
  Each command can be used as a rake task, or a directly from the Ruby code.
20
20
 
@@ -53,9 +53,9 @@ RailsPGExtras.cache_hit(in_format: :raw) =>
53
53
  #<PG::Result:0x00007f75777f7328 status=PGRES_TUPLES_OK ntuples=2 nfields=2 cmd_tuples=2>
54
54
  ```
55
55
 
56
- ### Available methods
56
+ ## Available methods
57
57
 
58
- #### `cache_hit`
58
+ ### `cache_hit`
59
59
 
60
60
  ```
61
61
  $ rake pg_extras:cache_hit
@@ -69,7 +69,7 @@ $ rake pg_extras:cache_hit
69
69
 
70
70
  This command provides information on the efficiency of the buffer cache, for both index reads (`index hit rate`) as well as table reads (`table hit rate`). A low buffer cache hit ratio can be a sign that the Postgres instance is too small for the workload.
71
71
 
72
- #### `index_cache_hit`
72
+ ### `index_cache_hit`
73
73
 
74
74
  ```
75
75
 
@@ -85,7 +85,7 @@ $ rake pg_extras:index_cache_hit
85
85
 
86
86
  The same as `cache_hit` with each table's indexes cache hit info displayed seperately.
87
87
 
88
- #### `table_cache_hit`
88
+ ### `table_cache_hit`
89
89
 
90
90
  ```
91
91
 
@@ -101,7 +101,7 @@ $ rake pg_extras:table_cache_hit
101
101
 
102
102
  The same as `cache_hit` with each table's cache hit info displayed seperately.
103
103
 
104
- #### `index_usage`
104
+ ### `index_usage`
105
105
 
106
106
  ```
107
107
  $ rake pg_extras:index_usage
@@ -322,7 +322,7 @@ $ rake pg_extras:seq_scans
322
322
 
323
323
  This command displays the number of sequential scans recorded against all tables, descending by count of sequential scans. Tables that have very high numbers of sequential scans may be underindexed, and it may be worth investigating queries that read from these tables.
324
324
 
325
- ### long_running_queries
325
+ ### `long_running_queries`
326
326
 
327
327
  ```
328
328
  $ rake pg_extras:long_running_queries
@@ -337,7 +337,7 @@ $ rake pg_extras:long_running_queries
337
337
 
338
338
  This command displays currently running queries, that have been running for longer than 5 minutes, descending by duration. Very long running queries can be a source of multiple issues, such as preventing DDL statements completing or vacuum being unable to update `relfrozenxid`.
339
339
 
340
- ### records_rank
340
+ ### `records_rank`
341
341
 
342
342
  ```
343
343
  $ rake pg_extras:records_rank
@@ -355,7 +355,7 @@ $ rake pg_extras:records_rank
355
355
 
356
356
  This command displays an estimated count of rows per table, descending by estimated count. The estimated count is derived from `n_live_tup`, which is updated by vacuum operations. Due to the way `n_live_tup` is populated, sparse vs. dense pages can result in estimations that are significantly out from the real count of rows.
357
357
 
358
- ### bloat
358
+ ### `bloat`
359
359
 
360
360
  ```
361
361
  $ rake pg_extras:bloat
@@ -372,7 +372,7 @@ $ rake pg_extras:bloat
372
372
 
373
373
  This command displays an estimation of table "bloat" – space allocated to a relation that is full of dead tuples, that has yet to be reclaimed. Tables that have a high bloat ratio, typically 10 or greater, should be investigated to see if vacuuming is aggressive enough, and can be a sign of high table churn.
374
374
 
375
- ### vacuum_stats
375
+ ### `vacuum_stats`
376
376
 
377
377
  ```
378
378
  $ rake pg_extras:vacuum_stats
@@ -388,6 +388,16 @@ $ rake pg_extras:vacuum_stats
388
388
 
389
389
  This command displays statistics related to vacuum operations for each table, including an estiamtion of dead rows, last autovacuum and the current autovacuum threshold. This command can be useful when determining if current vacuum thresholds require adjustments, and to determine when the table was last vacuumed.
390
390
 
391
+ ### `kill_all`
392
+
393
+ ```ruby
394
+
395
+ RailsPGExtras.kill_all
396
+
397
+ ```
398
+
399
+ 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.
400
+
391
401
  ### mandelbrot
392
402
 
393
403
  ```
@@ -401,7 +411,3 @@ This command outputs the Mandelbrot set, calculated through SQL.
401
411
  * Does is not violate the Heroku PG Extras license?
402
412
 
403
413
  The original plugin is MIT based so it means that copying and redistribution in any format is permitted.
404
-
405
- ## Disclaimer
406
-
407
- This tool is in beta state.
@@ -1,3 +1,3 @@
1
1
  module RailsPGExtras
2
- VERSION = "1.0.0"
2
+ VERSION = "1.1.0"
3
3
  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: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - pawurb
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-01-18 00:00:00.000000000 Z
11
+ date: 2020-02-23 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: 1.0.0
19
+ version: 1.1.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: 1.0.0
26
+ version: 1.1.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: activerecord
29
29
  requirement: !ruby/object:Gem::Requirement