ruby-pg-extras 1.2.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +34 -7
- data/lib/ruby-pg-extras/version.rb +3 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 159b413f611699a0be3d00f9c15efee109a910a28fe047d9c9f2a33b477a500b
|
4
|
+
data.tar.gz: 9a7ff1ad3c60a82fd7396f557833c66eb536d7d7c0f0fab8eeb0db7803603a5b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db53acf068d87f8d2947af7128acaa13ec5d4bd402626b18152d0131baafac4395dded2f4e1003272ecae9a5b6f1fd4aef8a9fb589ba96d9cafb1f3b252f832c
|
7
|
+
data.tar.gz: 5357e82fa106c7511f15b731899228bb2e045cf22a597f588eb6244e537104627e3b142752ffe63aa61bacab0215ebc425642b6d48c8e928593a23ef387f34f3
|
data/README.md
CHANGED
@@ -4,7 +4,17 @@ Ruby port of [Heroku PG Extras](https://github.com/heroku/heroku-pg-extras) with
|
|
4
4
|
|
5
5
|
Queries can be used to obtain information about a Postgres instance, that may be useful when analyzing performance issues. This includes information about locks, index usage, buffer cache hit ratios and vacuum statistics. Ruby API enables developers to easily integrate the tool into e.g. automatic monitoring tasks.
|
6
6
|
|
7
|
-
|
7
|
+
You can check out this blog post for detailed step by step tutorial on how to [optimize PostgreSQL using PG Extras library](https://pawelurbanek.com/postgresql-fix-performance).
|
8
|
+
|
9
|
+
Alternative versions:
|
10
|
+
|
11
|
+
- [Ruby on Rails](https://github.com/pawurb/rails-pg-extras)
|
12
|
+
|
13
|
+
- [NodeJS](https://github.com/pawurb/node-postgres-extras)
|
14
|
+
|
15
|
+
- [Elixir](https://github.com/pawurb/ecto_psql_extras)
|
16
|
+
|
17
|
+
- [Python](https://github.com/pawurb/python-pg-extras)
|
8
18
|
|
9
19
|
## Installation
|
10
20
|
|
@@ -14,6 +24,19 @@ In your Gemfile
|
|
14
24
|
gem "ruby-pg-extras"
|
15
25
|
```
|
16
26
|
|
27
|
+
Some of the queries (e.g., `calls` and `outliers`) require [pg_stat_statements](https://www.postgresql.org/docs/current/pgstatstatements.html) extension enabled.
|
28
|
+
|
29
|
+
You can check if it is enabled in your database by running:
|
30
|
+
|
31
|
+
```ruby
|
32
|
+
RubyPGExtras.extensions
|
33
|
+
```
|
34
|
+
You should see the similar line in the output:
|
35
|
+
|
36
|
+
```bash
|
37
|
+
| pg_stat_statements | 1.7 | 1.7 | track execution statistics of all SQL statements executed |
|
38
|
+
```
|
39
|
+
|
17
40
|
## Usage
|
18
41
|
|
19
42
|
Gem expects the `ENV['DATABASE_URL']` value in the following format:
|
@@ -424,18 +447,22 @@ RubyPGExtras.kill_all
|
|
424
447
|
|
425
448
|
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.
|
426
449
|
|
427
|
-
### `
|
450
|
+
### `extensions`
|
428
451
|
|
429
452
|
```ruby
|
430
453
|
|
431
|
-
RubyPGExtras.
|
454
|
+
RubyPGExtras.extensions
|
432
455
|
|
433
456
|
```
|
434
457
|
|
435
|
-
This command
|
458
|
+
This command lists all the currently installed and available PostgreSQL extensions.
|
436
459
|
|
437
|
-
|
460
|
+
### `mandelbrot`
|
438
461
|
|
439
|
-
|
462
|
+
```ruby
|
440
463
|
|
441
|
-
|
464
|
+
RubyPGExtras.mandelbrot
|
465
|
+
|
466
|
+
```
|
467
|
+
|
468
|
+
This command outputs the Mandelbrot set, calculated through SQL.
|
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: 1.2.
|
4
|
+
version: 1.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- pawurb
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-10-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pg
|
@@ -114,7 +114,7 @@ homepage: http://github.com/pawurb/ruby-pg-extras
|
|
114
114
|
licenses:
|
115
115
|
- MIT
|
116
116
|
metadata: {}
|
117
|
-
post_install_message:
|
117
|
+
post_install_message:
|
118
118
|
rdoc_options: []
|
119
119
|
require_paths:
|
120
120
|
- lib
|
@@ -129,8 +129,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
129
129
|
- !ruby/object:Gem::Version
|
130
130
|
version: '0'
|
131
131
|
requirements: []
|
132
|
-
rubygems_version: 3.
|
133
|
-
signing_key:
|
132
|
+
rubygems_version: 3.1.2
|
133
|
+
signing_key:
|
134
134
|
specification_version: 4
|
135
135
|
summary: Ruby PostgreSQL performance database insights
|
136
136
|
test_files:
|