pghero 2.3.0 → 2.5.1
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.
Potentially problematic release.
This version of pghero might be problematic. Click here for more details.
- checksums.yaml +4 -4
 - data/CHANGELOG.md +85 -54
 - data/README.md +20 -8
 - data/app/assets/javascripts/pghero/Chart.bundle.js +16260 -15580
 - data/app/assets/javascripts/pghero/application.js +8 -7
 - data/app/assets/javascripts/pghero/chartkick.js +1973 -1325
 - data/app/assets/javascripts/pghero/highlight.pack.js +2 -2
 - data/app/assets/javascripts/pghero/jquery.js +3605 -4015
 - data/app/assets/javascripts/pghero/nouislider.js +2479 -0
 - data/app/assets/stylesheets/pghero/application.css +1 -1
 - data/app/assets/stylesheets/pghero/nouislider.css +299 -0
 - data/app/controllers/pg_hero/home_controller.rb +94 -35
 - data/app/helpers/pg_hero/home_helper.rb +11 -0
 - data/app/views/pg_hero/home/_live_queries_table.html.erb +14 -2
 - data/app/views/pg_hero/home/connections.html.erb +9 -0
 - data/app/views/pg_hero/home/index.html.erb +49 -10
 - data/app/views/pg_hero/home/live_queries.html.erb +1 -1
 - data/app/views/pg_hero/home/maintenance.html.erb +16 -2
 - data/app/views/pg_hero/home/relation_space.html.erb +2 -2
 - data/app/views/pg_hero/home/show_query.html.erb +3 -3
 - data/app/views/pg_hero/home/space.html.erb +3 -3
 - data/app/views/pg_hero/home/system.html.erb +4 -4
 - data/app/views/pg_hero/home/tune.html.erb +2 -1
 - data/lib/generators/pghero/templates/config.yml.tt +21 -1
 - data/lib/pghero.rb +63 -15
 - data/lib/pghero/database.rb +101 -17
 - data/lib/pghero/methods/basic.rb +28 -7
 - data/lib/pghero/methods/connections.rb +35 -0
 - data/lib/pghero/methods/constraints.rb +30 -0
 - data/lib/pghero/methods/indexes.rb +1 -1
 - data/lib/pghero/methods/maintenance.rb +3 -1
 - data/lib/pghero/methods/queries.rb +6 -2
 - data/lib/pghero/methods/query_stats.rb +12 -3
 - data/lib/pghero/methods/suggested_indexes.rb +1 -1
 - data/lib/pghero/methods/system.rb +219 -23
 - data/lib/pghero/stats.rb +1 -1
 - data/lib/pghero/version.rb +1 -1
 - metadata +6 -5
 - data/app/assets/javascripts/pghero/jquery.nouislider.min.js +0 -31
 - data/app/assets/stylesheets/pghero/jquery.nouislider.css +0 -165
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 8e147c844a9c109baa794e9a3950e747539e2b15f19b781e9822edaed5f216ff
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: e18d81b6876148607514621d96b7b84f9436081f7eb4660008cbf3148578bbe5
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 1eea90a86822be5ee51a1b0b34e5e86297909a6bb41d4cf6589162285b8d2414b63c119cfba7d4df5b6f78d0b755ff517b47420c1ddd27a0cadcc51f0305f465
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: afc7bb09d979dada5636a8056ae1d692b88d8fc0cfda0af8d81f02a4a413499027953c4506c7a627da27c5c9b9f87aca1c030d76a0caa758773c6483c4ac171a
         
     | 
    
        data/CHANGELOG.md
    CHANGED
    
    | 
         @@ -1,16 +1,47 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            ## 2. 
     | 
| 
      
 1 
     | 
    
         
            +
            ## 2.5.1 (2020-06-23)
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            - Added support for `google-cloud-monitoring` >= 1
         
     | 
| 
      
 4 
     | 
    
         
            +
            - Added support for `google-cloud-monitoring-v3`
         
     | 
| 
      
 5 
     | 
    
         
            +
            - Fixed system stats not showing up in Rails 6 with environment variables
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
            ## 2.5.0 (2020-05-24)
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
            - Added system stats for Google Cloud SQL and Azure Database
         
     | 
| 
      
 10 
     | 
    
         
            +
            - Added experimental `filter_data` option
         
     | 
| 
      
 11 
     | 
    
         
            +
            - Localized times on maintenance page
         
     | 
| 
      
 12 
     | 
    
         
            +
            - Improved connection pooling
         
     | 
| 
      
 13 
     | 
    
         
            +
            - Improved error message for non-Postgres connections
         
     | 
| 
      
 14 
     | 
    
         
            +
            - Fixed more deprecation warnings in Ruby 2.7
         
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
      
 16 
     | 
    
         
            +
            ## 2.4.2 (2020-04-16)
         
     | 
| 
      
 17 
     | 
    
         
            +
             
     | 
| 
      
 18 
     | 
    
         
            +
            - Added `connections` method
         
     | 
| 
      
 19 
     | 
    
         
            +
            - Fixed deprecation warnings in Ruby 2.7
         
     | 
| 
      
 20 
     | 
    
         
            +
             
     | 
| 
      
 21 
     | 
    
         
            +
            ## 2.4.1 (2019-11-21)
         
     | 
| 
      
 22 
     | 
    
         
            +
             
     | 
| 
      
 23 
     | 
    
         
            +
            - Fixed file permissions on `highlight.pack.js`
         
     | 
| 
      
 24 
     | 
    
         
            +
             
     | 
| 
      
 25 
     | 
    
         
            +
            ## 2.4.0 (2019-11-11)
         
     | 
| 
      
 26 
     | 
    
         
            +
             
     | 
| 
      
 27 
     | 
    
         
            +
            - Added `invalid_constraints` method
         
     | 
| 
      
 28 
     | 
    
         
            +
            - Added `spec` option
         
     | 
| 
      
 29 
     | 
    
         
            +
            - Added `override_csp` option
         
     | 
| 
      
 30 
     | 
    
         
            +
            - Show all databases in Rails 6 when no config
         
     | 
| 
      
 31 
     | 
    
         
            +
             
     | 
| 
      
 32 
     | 
    
         
            +
            ## 2.3.0 (2019-08-18)
         
     | 
| 
       2 
33 
     | 
    
         | 
| 
       3 
34 
     | 
    
         
             
            - Added support for Postgres 12 beta 1
         
     | 
| 
       4 
35 
     | 
    
         
             
            - Added methods and tasks for cleaning up stats
         
     | 
| 
       5 
36 
     | 
    
         
             
            - Dropped support for Rails < 5
         
     | 
| 
       6 
37 
     | 
    
         | 
| 
       7 
     | 
    
         
            -
            ## 2.2.1
         
     | 
| 
      
 38 
     | 
    
         
            +
            ## 2.2.1 (2019-06-04)
         
     | 
| 
       8 
39 
     | 
    
         | 
| 
       9 
40 
     | 
    
         
             
            - Added `config_path` option
         
     | 
| 
       10 
41 
     | 
    
         
             
            - Fixed error with sequences when temporary tables
         
     | 
| 
       11 
42 
     | 
    
         
             
            - Fixed error when `config.action_controller.include_all_helpers = false`
         
     | 
| 
       12 
43 
     | 
    
         | 
| 
       13 
     | 
    
         
            -
            ## 2.2.0
         
     | 
| 
      
 44 
     | 
    
         
            +
            ## 2.2.0 (2018-09-03)
         
     | 
| 
       14 
45 
     | 
    
         | 
| 
       15 
46 
     | 
    
         
             
            - Added check for connections idle in transaction
         
     | 
| 
       16 
47 
     | 
    
         
             
            - Improved duplicate index logic to detect more duplicates
         
     | 
| 
         @@ -18,64 +49,64 @@ 
     | 
|
| 
       18 
49 
     | 
    
         
             
            - Fixed error with large number of sequences
         
     | 
| 
       19 
50 
     | 
    
         
             
            - Bumped `total_connections_threshold` to 500 by default
         
     | 
| 
       20 
51 
     | 
    
         | 
| 
       21 
     | 
    
         
            -
            ## 2.1.1
         
     | 
| 
      
 52 
     | 
    
         
            +
            ## 2.1.1 (2018-04-24)
         
     | 
| 
       22 
53 
     | 
    
         | 
| 
       23 
54 
     | 
    
         
             
            - Added `explain_timeout_sec` option
         
     | 
| 
       24 
55 
     | 
    
         
             
            - Fixed error with unparsable sequences
         
     | 
| 
       25 
56 
     | 
    
         
             
            - Stopped throwing `Same sequence name in multiple schemas` error
         
     | 
| 
       26 
57 
     | 
    
         | 
| 
       27 
     | 
    
         
            -
            ## 2.1.0
         
     | 
| 
      
 58 
     | 
    
         
            +
            ## 2.1.0 (2017-11-30)
         
     | 
| 
       28 
59 
     | 
    
         | 
| 
       29 
60 
     | 
    
         
             
            - Fixed issue with sequences in different schema than table
         
     | 
| 
       30 
61 
     | 
    
         
             
            - No longer throw errors for unreadable sequences
         
     | 
| 
       31 
62 
     | 
    
         
             
            - Fixed replication lag for Amazon Aurora
         
     | 
| 
       32 
63 
     | 
    
         
             
            - Added `vacuum_progress` method
         
     | 
| 
       33 
64 
     | 
    
         | 
| 
       34 
     | 
    
         
            -
            ## 2.0.8
         
     | 
| 
      
 65 
     | 
    
         
            +
            ## 2.0.8 (2017-11-12)
         
     | 
| 
       35 
66 
     | 
    
         | 
| 
       36 
67 
     | 
    
         
             
            - Added support for Postgres 10 replicas
         
     | 
| 
       37 
68 
     | 
    
         
             
            - Added support for pg_query 1.0.0
         
     | 
| 
       38 
69 
     | 
    
         
             
            - Show queries with insufficient privilege on live queries page
         
     | 
| 
       39 
70 
     | 
    
         
             
            - Default to table schema for sequences
         
     | 
| 
       40 
71 
     | 
    
         | 
| 
       41 
     | 
    
         
            -
            ## 2.0.7
         
     | 
| 
      
 72 
     | 
    
         
            +
            ## 2.0.7 (2017-10-28)
         
     | 
| 
       42 
73 
     | 
    
         | 
| 
       43 
74 
     | 
    
         
             
            - Fixed issue with sequences in different schema than table
         
     | 
| 
       44 
75 
     | 
    
         
             
            - Fixed query details when multiple users have same query hash
         
     | 
| 
       45 
76 
     | 
    
         
             
            - Fixed error with invalid indexes in non-public schema
         
     | 
| 
       46 
77 
     | 
    
         
             
            - Raise error when capture query stats fails
         
     | 
| 
       47 
78 
     | 
    
         | 
| 
       48 
     | 
    
         
            -
            ## 2.0.6
         
     | 
| 
      
 79 
     | 
    
         
            +
            ## 2.0.6 (2017-09-24)
         
     | 
| 
       49 
80 
     | 
    
         | 
| 
       50 
81 
     | 
    
         
             
            - More robust methods for multiple databases
         
     | 
| 
       51 
82 
     | 
    
         
             
            - Added support for `RAILS_RELATIVE_URL_ROOT` for Linux and Docker
         
     | 
| 
       52 
83 
     | 
    
         | 
| 
       53 
     | 
    
         
            -
            ## 2.0.5
         
     | 
| 
      
 84 
     | 
    
         
            +
            ## 2.0.5 (2017-09-14)
         
     | 
| 
       54 
85 
     | 
    
         | 
| 
       55 
86 
     | 
    
         
             
            - Fixed error with sequences in different schemas
         
     | 
| 
       56 
87 
     | 
    
         
             
            - Better advice
         
     | 
| 
       57 
88 
     | 
    
         | 
| 
       58 
     | 
    
         
            -
            ## 2.0.4
         
     | 
| 
      
 89 
     | 
    
         
            +
            ## 2.0.4 (2017-08-28)
         
     | 
| 
       59 
90 
     | 
    
         | 
| 
       60 
91 
     | 
    
         
             
            - Fixed `AssetNotPrecompiled` error
         
     | 
| 
       61 
92 
     | 
    
         
             
            - Do not silently ignore sequence danger when user does not have permissions
         
     | 
| 
       62 
93 
     | 
    
         | 
| 
       63 
     | 
    
         
            -
            ## 2.0.3
         
     | 
| 
      
 94 
     | 
    
         
            +
            ## 2.0.3 (2017-08-22)
         
     | 
| 
       64 
95 
     | 
    
         | 
| 
       65 
96 
     | 
    
         
             
            - Added SQL to recreate invalid indexes
         
     | 
| 
       66 
97 
     | 
    
         
             
            - Added unused index marker to Space page
         
     | 
| 
       67 
98 
     | 
    
         
             
            - Fixed `capture_query_stats` on Postgres < 9.4
         
     | 
| 
       68 
99 
     | 
    
         | 
| 
       69 
     | 
    
         
            -
            ## 2.0.2
         
     | 
| 
      
 100 
     | 
    
         
            +
            ## 2.0.2 (2017-08-09)
         
     | 
| 
       70 
101 
     | 
    
         | 
| 
       71 
102 
     | 
    
         
             
            - Fixed error with suggested indexes
         
     | 
| 
       72 
103 
     | 
    
         
             
            - Fixed error with `pg_replication_slots`
         
     | 
| 
       73 
104 
     | 
    
         | 
| 
       74 
     | 
    
         
            -
            ## 2.0.1
         
     | 
| 
      
 105 
     | 
    
         
            +
            ## 2.0.1 (2017-08-08)
         
     | 
| 
       75 
106 
     | 
    
         | 
| 
       76 
107 
     | 
    
         
             
            - Fixed capture space stats
         
     | 
| 
       77 
108 
     | 
    
         | 
| 
       78 
     | 
    
         
            -
            ## 2.0.0
         
     | 
| 
      
 109 
     | 
    
         
            +
            ## 2.0.0 (2017-08-08)
         
     | 
| 
       79 
110 
     | 
    
         | 
| 
       80 
111 
     | 
    
         
             
            New features
         
     | 
| 
       81 
112 
     | 
    
         | 
| 
         @@ -106,27 +137,27 @@ PgHero.with(:database2) { PgHero.running_queries } 
     | 
|
| 
       106 
137 
     | 
    
         
             
            - Removed options from `connection_sources` method
         
     | 
| 
       107 
138 
     | 
    
         
             
            - Removed `locks` method
         
     | 
| 
       108 
139 
     | 
    
         | 
| 
       109 
     | 
    
         
            -
            ## 1.7.0
         
     | 
| 
      
 140 
     | 
    
         
            +
            ## 1.7.0 (2017-05-01)
         
     | 
| 
       110 
141 
     | 
    
         | 
| 
       111 
142 
     | 
    
         
             
            - Fixed migrations for Rails 5.1+
         
     | 
| 
       112 
143 
     | 
    
         
             
            - Added `analyze`, `analyze_tables`, and `analyze_all` methods
         
     | 
| 
       113 
144 
     | 
    
         
             
            - Added `pghero:analyze` rake task
         
     | 
| 
       114 
145 
     | 
    
         
             
            - Fixed system stats display issue
         
     | 
| 
       115 
146 
     | 
    
         | 
| 
       116 
     | 
    
         
            -
            ## 1.6.5
         
     | 
| 
      
 147 
     | 
    
         
            +
            ## 1.6.5 (2017-04-19)
         
     | 
| 
       117 
148 
     | 
    
         | 
| 
       118 
149 
     | 
    
         
             
            - Added support for Rails API
         
     | 
| 
       119 
150 
     | 
    
         
             
            - Added support for Amazon STS
         
     | 
| 
       120 
151 
     | 
    
         
             
            - Fixed replica check when `hot_standby = on` for primary
         
     | 
| 
       121 
152 
     | 
    
         | 
| 
       122 
     | 
    
         
            -
            ## 1.6.4
         
     | 
| 
      
 153 
     | 
    
         
            +
            ## 1.6.4 (2017-03-12)
         
     | 
| 
       123 
154 
     | 
    
         | 
| 
       124 
155 
     | 
    
         
             
            - Only show connection charts if there are connections
         
     | 
| 
       125 
156 
     | 
    
         
             
            - Fixed duplicate indexes for multiple schemas
         
     | 
| 
       126 
157 
     | 
    
         
             
            - Fixed display issue for queries without word break
         
     | 
| 
       127 
158 
     | 
    
         
             
            - Removed maintenance tab for replicas
         
     | 
| 
       128 
159 
     | 
    
         | 
| 
       129 
     | 
    
         
            -
            ## 1.6.3
         
     | 
| 
      
 160 
     | 
    
         
            +
            ## 1.6.3 (2017-02-09)
         
     | 
| 
       130 
161 
     | 
    
         | 
| 
       131 
162 
     | 
    
         
             
            - Added 10 second timeout for explain
         
     | 
| 
       132 
163 
     | 
    
         
             
            - No longer show autovacuum in long running queries
         
     | 
| 
         @@ -135,36 +166,36 @@ PgHero.with(:database2) { PgHero.running_queries } 
     | 
|
| 
       135 
166 
     | 
    
         
             
            - Removed Chartkick gem dependency for charts
         
     | 
| 
       136 
167 
     | 
    
         
             
            - Fixed error when primary database is not PostgreSQL
         
     | 
| 
       137 
168 
     | 
    
         | 
| 
       138 
     | 
    
         
            -
            ## 1.6.2
         
     | 
| 
      
 169 
     | 
    
         
            +
            ## 1.6.2 (2016-10-26)
         
     | 
| 
       139 
170 
     | 
    
         | 
| 
       140 
171 
     | 
    
         
             
            - Suggest GiST over GIN for `LIKE` queries again (seeing better performance)
         
     | 
| 
       141 
172 
     | 
    
         | 
| 
       142 
     | 
    
         
            -
            ## 1.6.1
         
     | 
| 
      
 173 
     | 
    
         
            +
            ## 1.6.1 (2016-10-24)
         
     | 
| 
       143 
174 
     | 
    
         | 
| 
       144 
175 
     | 
    
         
             
            - Suggest GIN over GiST for `LIKE` queries
         
     | 
| 
       145 
176 
     | 
    
         | 
| 
       146 
     | 
    
         
            -
            ## 1.6.0
         
     | 
| 
      
 177 
     | 
    
         
            +
            ## 1.6.0 (2016-10-20)
         
     | 
| 
       147 
178 
     | 
    
         | 
| 
       148 
179 
     | 
    
         
             
            - Removed mostly inactionable items (cache hit rate and index usage)
         
     | 
| 
       149 
180 
     | 
    
         
             
            - Restored duplicate indexes to homepage
         
     | 
| 
       150 
181 
     | 
    
         
             
            - Fixed issue with exact duplicate indexes
         
     | 
| 
       151 
182 
     | 
    
         
             
            - Way better `blocked_queries` method
         
     | 
| 
       152 
183 
     | 
    
         | 
| 
       153 
     | 
    
         
            -
            ## 1.5.3
         
     | 
| 
      
 184 
     | 
    
         
            +
            ## 1.5.3 (2016-10-06)
         
     | 
| 
       154 
185 
     | 
    
         | 
| 
       155 
186 
     | 
    
         
             
            - Fixed Rails 5 error with multiple databases
         
     | 
| 
       156 
187 
     | 
    
         
             
            - Fixed duplicate index detection with expressions
         
     | 
| 
       157 
188 
     | 
    
         | 
| 
       158 
     | 
    
         
            -
            ## 1.5.2
         
     | 
| 
      
 189 
     | 
    
         
            +
            ## 1.5.2 (2016-10-01)
         
     | 
| 
       159 
190 
     | 
    
         | 
| 
       160 
191 
     | 
    
         
             
            - Added support for PostgreSQL 9.6
         
     | 
| 
       161 
192 
     | 
    
         
             
            - Fixed incorrect query start for live queries in transactions
         
     | 
| 
       162 
193 
     | 
    
         | 
| 
       163 
     | 
    
         
            -
            ## 1.5.1
         
     | 
| 
      
 194 
     | 
    
         
            +
            ## 1.5.1 (2016-09-27)
         
     | 
| 
       164 
195 
     | 
    
         | 
| 
       165 
196 
     | 
    
         
             
            - Better tune page for PostgreSQL 9.5
         
     | 
| 
       166 
197 
     | 
    
         | 
| 
       167 
     | 
    
         
            -
            ## 1.5.0
         
     | 
| 
      
 198 
     | 
    
         
            +
            ## 1.5.0 (2016-09-21)
         
     | 
| 
       168 
199 
     | 
    
         | 
| 
       169 
200 
     | 
    
         
             
            - Added user to query stats (opt-in)
         
     | 
| 
       170 
201 
     | 
    
         
             
            - Added user to connection sources
         
     | 
| 
         @@ -172,52 +203,52 @@ PgHero.with(:database2) { PgHero.running_queries } 
     | 
|
| 
       172 
203 
     | 
    
         
             
            - Added visualize button to explain page
         
     | 
| 
       173 
204 
     | 
    
         
             
            - Better charts for system stats
         
     | 
| 
       174 
205 
     | 
    
         | 
| 
       175 
     | 
    
         
            -
            ## 1.4.2
         
     | 
| 
      
 206 
     | 
    
         
            +
            ## 1.4.2 (2016-09-06)
         
     | 
| 
       176 
207 
     | 
    
         | 
| 
       177 
208 
     | 
    
         
             
            - Fixed `wrong constant name` error in development
         
     | 
| 
       178 
209 
     | 
    
         
             
            - Added different periods for system stats
         
     | 
| 
       179 
210 
     | 
    
         | 
| 
       180 
     | 
    
         
            -
            ## 1.4.1
         
     | 
| 
      
 211 
     | 
    
         
            +
            ## 1.4.1 (2016-08-25)
         
     | 
| 
       181 
212 
     | 
    
         | 
| 
       182 
213 
     | 
    
         
             
            - Removed external assets
         
     | 
| 
       183 
214 
     | 
    
         | 
| 
       184 
     | 
    
         
            -
            ## 1.4.0
         
     | 
| 
      
 215 
     | 
    
         
            +
            ## 1.4.0 (2016-08-24)
         
     | 
| 
       185 
216 
     | 
    
         | 
| 
       186 
217 
     | 
    
         
             
            - Updated for Rails 5
         
     | 
| 
       187 
218 
     | 
    
         
             
            - Fixed error when `pg_stat_statements` not enabled in `shared_libaries`
         
     | 
| 
       188 
219 
     | 
    
         | 
| 
       189 
     | 
    
         
            -
            ## 1.3.2
         
     | 
| 
      
 220 
     | 
    
         
            +
            ## 1.3.2 (2016-08-03)
         
     | 
| 
       190 
221 
     | 
    
         | 
| 
       191 
222 
     | 
    
         
             
            - Improved performance of query stats
         
     | 
| 
       192 
223 
     | 
    
         | 
| 
       193 
     | 
    
         
            -
            ## 1.3.1
         
     | 
| 
      
 224 
     | 
    
         
            +
            ## 1.3.1 (2016-07-10)
         
     | 
| 
       194 
225 
     | 
    
         | 
| 
       195 
226 
     | 
    
         
             
            - Improved grouping of query stats
         
     | 
| 
       196 
227 
     | 
    
         
             
            - Added `blocked_queries` method
         
     | 
| 
       197 
228 
     | 
    
         | 
| 
       198 
     | 
    
         
            -
            ## 1.3.0
         
     | 
| 
      
 229 
     | 
    
         
            +
            ## 1.3.0 (2016-06-27)
         
     | 
| 
       199 
230 
     | 
    
         | 
| 
       200 
231 
     | 
    
         
             
            - Added query hash for better query stats grouping
         
     | 
| 
       201 
232 
     | 
    
         
             
            - Added sequence danger check
         
     | 
| 
       202 
233 
     | 
    
         
             
            - Added `capture_query_stats` option to config
         
     | 
| 
       203 
234 
     | 
    
         | 
| 
       204 
     | 
    
         
            -
            ## 1.2.4
         
     | 
| 
      
 235 
     | 
    
         
            +
            ## 1.2.4 (2016-05-06)
         
     | 
| 
       205 
236 
     | 
    
         | 
| 
       206 
237 
     | 
    
         
             
            - Fixed user methods
         
     | 
| 
       207 
238 
     | 
    
         | 
| 
       208 
     | 
    
         
            -
            ## 1.2.3
         
     | 
| 
      
 239 
     | 
    
         
            +
            ## 1.2.3 (2016-04-20)
         
     | 
| 
       209 
240 
     | 
    
         | 
| 
       210 
241 
     | 
    
         
             
            - Added schema to queries
         
     | 
| 
       211 
242 
     | 
    
         
             
            - Fixed deprecation warning on Rails 5
         
     | 
| 
       212 
243 
     | 
    
         
             
            - Fix for pg_query >= 0.9.0
         
     | 
| 
       213 
244 
     | 
    
         | 
| 
       214 
     | 
    
         
            -
            ## 1.2.2
         
     | 
| 
      
 245 
     | 
    
         
            +
            ## 1.2.2 (2016-01-20)
         
     | 
| 
       215 
246 
     | 
    
         | 
| 
       216 
247 
     | 
    
         
             
            - Better suggested indexes
         
     | 
| 
       217 
248 
     | 
    
         
             
            - Removed duplicate indexes noise
         
     | 
| 
       218 
249 
     | 
    
         
             
            - Fixed partial and expression indexes
         
     | 
| 
       219 
250 
     | 
    
         | 
| 
       220 
     | 
    
         
            -
            ## 1.2.1
         
     | 
| 
      
 251 
     | 
    
         
            +
            ## 1.2.1 (2016-01-07)
         
     | 
| 
       221 
252 
     | 
    
         | 
| 
       222 
253 
     | 
    
         
             
            - Better suggested indexes
         
     | 
| 
       223 
254 
     | 
    
         
             
            - Removed unused indexes noise
         
     | 
| 
         @@ -226,7 +257,7 @@ PgHero.with(:database2) { PgHero.running_queries } 
     | 
|
| 
       226 
257 
     | 
    
         
             
            - Fixed suggested indexes for replicas
         
     | 
| 
       227 
258 
     | 
    
         
             
            - Fixed issue w/ suggested indexes where same table name exists in multiple schemas
         
     | 
| 
       228 
259 
     | 
    
         | 
| 
       229 
     | 
    
         
            -
            ## 1.2.0
         
     | 
| 
      
 260 
     | 
    
         
            +
            ## 1.2.0 (2015-12-31)
         
     | 
| 
       230 
261 
     | 
    
         | 
| 
       231 
262 
     | 
    
         
             
            - Added suggested indexes
         
     | 
| 
       232 
263 
     | 
    
         
             
            - Added duplicate indexes
         
     | 
| 
         @@ -236,38 +267,38 @@ PgHero.with(:database2) { PgHero.running_queries } 
     | 
|
| 
       236 
267 
     | 
    
         
             
            - Added configurable cache hit rate threshold
         
     | 
| 
       237 
268 
     | 
    
         
             
            - Show all connections in connections tab
         
     | 
| 
       238 
269 
     | 
    
         | 
| 
       239 
     | 
    
         
            -
            ## 1.1.4
         
     | 
| 
      
 270 
     | 
    
         
            +
            ## 1.1.4 (2015-12-08)
         
     | 
| 
       240 
271 
     | 
    
         | 
| 
       241 
272 
     | 
    
         
             
            - Added check for transaction ID wraparound failure
         
     | 
| 
       242 
273 
     | 
    
         
             
            - Added check for autovacuum danger
         
     | 
| 
       243 
274 
     | 
    
         | 
| 
       244 
     | 
    
         
            -
            ## 1.1.3
         
     | 
| 
      
 275 
     | 
    
         
            +
            ## 1.1.3 (2015-10-21)
         
     | 
| 
       245 
276 
     | 
    
         | 
| 
       246 
277 
     | 
    
         
             
            - Fixed system stats
         
     | 
| 
       247 
278 
     | 
    
         | 
| 
       248 
     | 
    
         
            -
            ## 1.1.2
         
     | 
| 
      
 279 
     | 
    
         
            +
            ## 1.1.2 (2015-10-18)
         
     | 
| 
       249 
280 
     | 
    
         | 
| 
       250 
281 
     | 
    
         
             
            - Added invalid indexes
         
     | 
| 
       251 
282 
     | 
    
         
             
            - Fixed RDS stats for aws-sdk 2
         
     | 
| 
       252 
283 
     | 
    
         | 
| 
       253 
     | 
    
         
            -
            ## 1.1.1
         
     | 
| 
      
 284 
     | 
    
         
            +
            ## 1.1.1 (2015-07-23)
         
     | 
| 
       254 
285 
     | 
    
         | 
| 
       255 
286 
     | 
    
         
             
            - Added `tables` option to `create_user` method
         
     | 
| 
       256 
287 
     | 
    
         
             
            - Added ability to sort query stats by average_time and calls
         
     | 
| 
       257 
288 
     | 
    
         
             
            - Only show unused indexes with no index scans in UI
         
     | 
| 
       258 
289 
     | 
    
         | 
| 
       259 
     | 
    
         
            -
            ## 1.1.0
         
     | 
| 
      
 290 
     | 
    
         
            +
            ## 1.1.0 (2015-06-26)
         
     | 
| 
       260 
291 
     | 
    
         | 
| 
       261 
292 
     | 
    
         
             
            - Added historical query stats
         
     | 
| 
       262 
293 
     | 
    
         | 
| 
       263 
     | 
    
         
            -
            ## 1.0.1
         
     | 
| 
      
 294 
     | 
    
         
            +
            ## 1.0.1 (2015-04-17)
         
     | 
| 
       264 
295 
     | 
    
         | 
| 
       265 
296 
     | 
    
         
             
            - Fixed connection bad errors
         
     | 
| 
       266 
297 
     | 
    
         
             
            - Restore previous connection properly for nested with blocks
         
     | 
| 
       267 
298 
     | 
    
         
             
            - Added analyze button to explain page
         
     | 
| 
       268 
299 
     | 
    
         
             
            - Added explain button to live queries page
         
     | 
| 
       269 
300 
     | 
    
         | 
| 
       270 
     | 
    
         
            -
            ## 1.0.0
         
     | 
| 
      
 301 
     | 
    
         
            +
            ## 1.0.0 (2015-04-11)
         
     | 
| 
       271 
302 
     | 
    
         | 
| 
       272 
303 
     | 
    
         
             
            - More platforms!
         
     | 
| 
       273 
304 
     | 
    
         
             
            - Support for multiple databases!
         
     | 
| 
         @@ -277,61 +308,61 @@ PgHero.with(:database2) { PgHero.running_queries } 
     | 
|
| 
       277 
308 
     | 
    
         
             
            - Added `kill_long_running_queries` method
         
     | 
| 
       278 
309 
     | 
    
         
             
            - Added env vars for settings
         
     | 
| 
       279 
310 
     | 
    
         | 
| 
       280 
     | 
    
         
            -
            ## 0.1.10
         
     | 
| 
      
 311 
     | 
    
         
            +
            ## 0.1.10 (2015-03-20)
         
     | 
| 
       281 
312 
     | 
    
         | 
| 
       282 
313 
     | 
    
         
             
            - Added connections page
         
     | 
| 
       283 
314 
     | 
    
         
             
            - Added message for insufficient privilege
         
     | 
| 
       284 
315 
     | 
    
         
             
            - Added `ip` to `connection_sources`
         
     | 
| 
       285 
316 
     | 
    
         | 
| 
       286 
     | 
    
         
            -
            ## 0.1.9
         
     | 
| 
      
 317 
     | 
    
         
            +
            ## 0.1.9 (2015-01-25)
         
     | 
| 
       287 
318 
     | 
    
         | 
| 
       288 
319 
     | 
    
         
             
            - Added tune page
         
     | 
| 
       289 
320 
     | 
    
         
             
            - Removed minimum size for unused indexes
         
     | 
| 
       290 
321 
     | 
    
         | 
| 
       291 
     | 
    
         
            -
            ## 0.1.8
         
     | 
| 
      
 322 
     | 
    
         
            +
            ## 0.1.8 (2015-01-19)
         
     | 
| 
       292 
323 
     | 
    
         | 
| 
       293 
324 
     | 
    
         
             
            - Added `total_percent` to `query_stats`
         
     | 
| 
       294 
325 
     | 
    
         
             
            - Added `total_connections`
         
     | 
| 
       295 
326 
     | 
    
         
             
            - Added `connection_stats` for Amazon RDS
         
     | 
| 
       296 
327 
     | 
    
         | 
| 
       297 
     | 
    
         
            -
            ## 0.1.7
         
     | 
| 
      
 328 
     | 
    
         
            +
            ## 0.1.7 (2014-11-12)
         
     | 
| 
       298 
329 
     | 
    
         | 
| 
       299 
330 
     | 
    
         
             
            - Added support for pg_stat_statments on Amazon RDS
         
     | 
| 
       300 
331 
     | 
    
         
             
            - Added `long_running_query_sec`, `slow_query_ms` and `slow_query_calls` options
         
     | 
| 
       301 
332 
     | 
    
         | 
| 
       302 
     | 
    
         
            -
            ## 0.1.6
         
     | 
| 
      
 333 
     | 
    
         
            +
            ## 0.1.6 (2014-10-09)
         
     | 
| 
       303 
334 
     | 
    
         | 
| 
       304 
335 
     | 
    
         
             
            - Added methods to create and drop users
         
     | 
| 
       305 
336 
     | 
    
         
             
            - Added locks
         
     | 
| 
       306 
337 
     | 
    
         | 
| 
       307 
     | 
    
         
            -
            ## 0.1.5
         
     | 
| 
      
 338 
     | 
    
         
            +
            ## 0.1.5 (2014-09-03)
         
     | 
| 
       308 
339 
     | 
    
         | 
| 
       309 
340 
     | 
    
         
             
            - Added system stats for Amazon RDS
         
     | 
| 
       310 
341 
     | 
    
         
             
            - Added code to remove unused indexes
         
     | 
| 
       311 
342 
     | 
    
         
             
            - Require unused indexes to be at least 1 MB
         
     | 
| 
       312 
343 
     | 
    
         
             
            - Use `pg_terminate_backend` to ensure queries are killed
         
     | 
| 
       313 
344 
     | 
    
         | 
| 
       314 
     | 
    
         
            -
            ## 0.1.4
         
     | 
| 
      
 345 
     | 
    
         
            +
            ## 0.1.4 (2014-08-31)
         
     | 
| 
       315 
346 
     | 
    
         | 
| 
       316 
347 
     | 
    
         
             
            - Reduced long running queries threshold to 1 minute
         
     | 
| 
       317 
348 
     | 
    
         
             
            - Fixed duration
         
     | 
| 
       318 
349 
     | 
    
         
             
            - Fixed wrapping
         
     | 
| 
       319 
350 
     | 
    
         
             
            - Friendlier dependencies for JRuby
         
     | 
| 
       320 
351 
     | 
    
         | 
| 
       321 
     | 
    
         
            -
            ## 0.1.3
         
     | 
| 
      
 352 
     | 
    
         
            +
            ## 0.1.3 (2014-08-04)
         
     | 
| 
       322 
353 
     | 
    
         | 
| 
       323 
354 
     | 
    
         
             
            - Reverted `query_stats_available?` fix
         
     | 
| 
       324 
355 
     | 
    
         | 
| 
       325 
     | 
    
         
            -
            ## 0.1.2
         
     | 
| 
      
 356 
     | 
    
         
            +
            ## 0.1.2 (2014-08-03)
         
     | 
| 
       326 
357 
     | 
    
         | 
| 
       327 
358 
     | 
    
         
             
            - Fixed `query_stats_available?` method
         
     | 
| 
       328 
359 
     | 
    
         | 
| 
       329 
     | 
    
         
            -
            ## 0.1.1
         
     | 
| 
      
 360 
     | 
    
         
            +
            ## 0.1.1 (2014-08-03)
         
     | 
| 
       330 
361 
     | 
    
         | 
| 
       331 
362 
     | 
    
         
             
            - Added explain
         
     | 
| 
       332 
363 
     | 
    
         
             
            - Added query stats
         
     | 
| 
       333 
364 
     | 
    
         
             
            - Fixed CSS issues
         
     | 
| 
       334 
365 
     | 
    
         | 
| 
       335 
     | 
    
         
            -
            ## 0.1.0
         
     | 
| 
      
 366 
     | 
    
         
            +
            ## 0.1.0 (2014-07-23)
         
     | 
| 
       336 
367 
     | 
    
         | 
| 
       337 
368 
     | 
    
         
             
            - First major release
         
     | 
    
        data/README.md
    CHANGED
    
    | 
         @@ -10,30 +10,42 @@ A performance dashboard for Postgres 
     | 
|
| 
       10 
10 
     | 
    
         | 
| 
       11 
11 
     | 
    
         
             
            ---
         
     | 
| 
       12 
12 
     | 
    
         | 
| 
       13 
     | 
    
         
            -
            [](https://pghero.dokkuapp.com/)
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
            :tangerine: Battle-tested at [Instacart](https://www.instacart.com/opensource)
         
     | 
| 
      
 16 
     | 
    
         
            +
             
     | 
| 
      
 17 
     | 
    
         
            +
            [](https://travis-ci.org/ankane/pghero) [](https://hub.docker.com/repository/docker/ankane/pghero)
         
     | 
| 
       14 
18 
     | 
    
         | 
| 
       15 
19 
     | 
    
         
             
            ## Installation
         
     | 
| 
       16 
20 
     | 
    
         | 
| 
       17 
     | 
    
         
            -
            PgHero is available as a  
     | 
| 
      
 21 
     | 
    
         
            +
            PgHero is available as a Docker image, Linux package, and Rails engine.
         
     | 
| 
       18 
22 
     | 
    
         | 
| 
       19 
23 
     | 
    
         
             
            Select your preferred method of installation to get started.
         
     | 
| 
       20 
24 
     | 
    
         | 
| 
       21 
     | 
    
         
            -
            - [Rails](guides/Rails.md)
         
     | 
| 
       22 
     | 
    
         
            -
            - [Linux](guides/Linux.md)
         
     | 
| 
       23 
25 
     | 
    
         
             
            - [Docker](guides/Docker.md)
         
     | 
| 
      
 26 
     | 
    
         
            +
            - [Linux](guides/Linux.md)
         
     | 
| 
      
 27 
     | 
    
         
            +
            - [Rails](guides/Rails.md)
         
     | 
| 
       24 
28 
     | 
    
         | 
| 
       25 
29 
     | 
    
         
             
            ## Related Projects
         
     | 
| 
       26 
30 
     | 
    
         | 
| 
      
 31 
     | 
    
         
            +
            - [Dexter](https://github.com/ankane/dexter) - The automatic indexer for Postgres
         
     | 
| 
       27 
32 
     | 
    
         
             
            - [PgBouncerHero](https://github.com/kwent/pgbouncerhero) - A dashboard for PgBouncer
         
     | 
| 
       28 
33 
     | 
    
         
             
            - [pgsync](https://github.com/ankane/pgsync) - Sync Postgres data between databases
         
     | 
| 
       29 
34 
     | 
    
         
             
            - [pgslice](https://github.com/ankane/pgslice) - Postgres partitioning as easy as pie
         
     | 
| 
       30 
35 
     | 
    
         | 
| 
       31 
36 
     | 
    
         
             
            ## Credits
         
     | 
| 
       32 
37 
     | 
    
         | 
| 
       33 
     | 
    
         
            -
            A big thanks to [Craig Kerstiens](http://www.craigkerstiens.com/2013/01/10/more-on-postgres-performance/) and [Heroku](https://blog.heroku.com/archives/2013/5/10/more_insight_into_your_database_with_pgextras) for the initial queries and [Bootswatch](https://github.com/thomaspark/bootswatch) for the theme 
     | 
| 
      
 38 
     | 
    
         
            +
            A big thanks to [Craig Kerstiens](http://www.craigkerstiens.com/2013/01/10/more-on-postgres-performance/) and [Heroku](https://blog.heroku.com/archives/2013/5/10/more_insight_into_your_database_with_pgextras) for the initial queries and [Bootswatch](https://github.com/thomaspark/bootswatch) for the theme.
         
     | 
| 
       34 
39 
     | 
    
         | 
| 
       35 
     | 
    
         
            -
             
     | 
| 
      
 40 
     | 
    
         
            +
            ## History
         
     | 
| 
       36 
41 
     | 
    
         | 
| 
       37 
     | 
    
         
            -
             
     | 
| 
      
 42 
     | 
    
         
            +
            View the [changelog](https://github.com/ankane/pghero/blob/master/CHANGELOG.md)
         
     | 
| 
      
 43 
     | 
    
         
            +
             
     | 
| 
      
 44 
     | 
    
         
            +
            ## Contributing
         
     | 
| 
      
 45 
     | 
    
         
            +
             
     | 
| 
      
 46 
     | 
    
         
            +
            Everyone is encouraged to help improve this project. Here are a few ways you can help:
         
     | 
| 
       38 
47 
     | 
    
         | 
| 
       39 
     | 
    
         
            -
            [ 
     | 
| 
      
 48 
     | 
    
         
            +
            - [Report bugs](https://github.com/ankane/pghero/issues)
         
     | 
| 
      
 49 
     | 
    
         
            +
            - Fix bugs and [submit pull requests](https://github.com/ankane/pghero/pulls)
         
     | 
| 
      
 50 
     | 
    
         
            +
            - Write, clarify, or fix documentation
         
     | 
| 
      
 51 
     | 
    
         
            +
            - Suggest or add new features
         
     |