pghero 3.6.2 → 3.8.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 +4 -4
- data/CHANGELOG.md +12 -2
- data/LICENSE.txt +1 -1
- data/README.md +1 -1
- data/app/controllers/pg_hero/home_controller.rb +4 -4
- data/lib/pghero/engine.rb +2 -1
- data/lib/pghero/methods/settings.rb +16 -2
- data/lib/pghero/version.rb +1 -1
- data/lib/pghero.rb +4 -10
- 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: 0d7711ad71025eb872742385c955bc1f991c889e2afa15eb113cf7ecf5e7727a
|
|
4
|
+
data.tar.gz: 457aeafacc98212f64854a1cbeb9aea145ec5ef0c26b7401c10e94961719c70b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 38919815f0445a368c21785f99fdd94a16a24370ead143e41a6833f0e664e834cc7ebf91dc31d008445c026e619dcce891d32e10ce2eee95a80fa758a700f8f3
|
|
7
|
+
data.tar.gz: 49fcebe5ffcd7ba3921b392558ec71d1b806b9a9189a9a42cfd106d71fe8ec42945d9ed25048b04abf77f3e924a2cb0f105c13242f1acd6be384017655eed840
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
## 3.8.0 (2026-04-15)
|
|
2
|
+
|
|
3
|
+
- Updated tune page for latest PgTune
|
|
4
|
+
- Dropped support for Ruby < 3.3 and Rails < 7.2
|
|
5
|
+
|
|
6
|
+
## 3.7.0 (2025-05-26)
|
|
7
|
+
|
|
8
|
+
- Dropped support for Linux package for Ubuntu 20.04
|
|
9
|
+
- Dropped support for Ruby < 3.2 and Rails < 7.1
|
|
10
|
+
|
|
1
11
|
## 3.6.2 (2025-03-21)
|
|
2
12
|
|
|
3
13
|
- Improved query in `sequences` method
|
|
@@ -345,7 +355,7 @@ PgHero.with(:database2) { PgHero.running_queries }
|
|
|
345
355
|
## 1.4.0 (2016-08-24)
|
|
346
356
|
|
|
347
357
|
- Updated for Rails 5
|
|
348
|
-
- Fixed error when `pg_stat_statements` not enabled in `
|
|
358
|
+
- Fixed error when `pg_stat_statements` not enabled in `shared_libraries`
|
|
349
359
|
|
|
350
360
|
## 1.3.2 (2016-08-03)
|
|
351
361
|
|
|
@@ -457,7 +467,7 @@ PgHero.with(:database2) { PgHero.running_queries }
|
|
|
457
467
|
|
|
458
468
|
## 0.1.7 (2014-11-12)
|
|
459
469
|
|
|
460
|
-
- Added support for
|
|
470
|
+
- Added support for pg_stat_statements on Amazon RDS
|
|
461
471
|
- Added `long_running_query_sec`, `slow_query_ms` and `slow_query_calls` options
|
|
462
472
|
|
|
463
473
|
## 0.1.6 (2014-10-09)
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
|
@@ -29,7 +29,7 @@ Select your preferred method of installation to get started.
|
|
|
29
29
|
|
|
30
30
|
## Credits
|
|
31
31
|
|
|
32
|
-
A big thanks to [Craig Kerstiens](
|
|
32
|
+
A big thanks to [Craig Kerstiens](https://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.
|
|
33
33
|
|
|
34
34
|
## History
|
|
35
35
|
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
module PgHero
|
|
2
2
|
class HomeController < ActionController::Base
|
|
3
|
-
|
|
3
|
+
http_basic_authenticate_with name: PgHero.username, password: PgHero.password if PgHero.password
|
|
4
4
|
|
|
5
5
|
protect_from_forgery with: :exception
|
|
6
6
|
|
|
7
|
-
http_basic_authenticate_with name: PgHero.username, password: PgHero.password if PgHero.password
|
|
8
|
-
|
|
9
7
|
before_action :check_api
|
|
10
8
|
before_action :set_database
|
|
11
9
|
before_action :set_query_stats_enabled
|
|
@@ -23,6 +21,8 @@ module PgHero
|
|
|
23
21
|
end
|
|
24
22
|
end
|
|
25
23
|
|
|
24
|
+
layout "pg_hero/application"
|
|
25
|
+
|
|
26
26
|
def index
|
|
27
27
|
@title = "Overview"
|
|
28
28
|
@extended = params[:extended]
|
|
@@ -437,7 +437,7 @@ module PgHero
|
|
|
437
437
|
|
|
438
438
|
protected
|
|
439
439
|
|
|
440
|
-
def redirect_backward(options
|
|
440
|
+
def redirect_backward(**options)
|
|
441
441
|
redirect_back fallback_location: root_path, **options
|
|
442
442
|
end
|
|
443
443
|
|
data/lib/pghero/engine.rb
CHANGED
|
@@ -3,12 +3,26 @@ module PgHero
|
|
|
3
3
|
module Settings
|
|
4
4
|
def settings
|
|
5
5
|
names =
|
|
6
|
-
if server_version_num >=
|
|
6
|
+
if server_version_num >= 180000
|
|
7
7
|
%i(
|
|
8
8
|
max_connections shared_buffers effective_cache_size maintenance_work_mem
|
|
9
9
|
checkpoint_completion_target wal_buffers default_statistics_target
|
|
10
10
|
random_page_cost effective_io_concurrency work_mem huge_pages
|
|
11
|
-
min_wal_size max_wal_size
|
|
11
|
+
jit wal_compression io_method min_wal_size max_wal_size
|
|
12
|
+
)
|
|
13
|
+
elsif server_version_num >= 120000
|
|
14
|
+
%i(
|
|
15
|
+
max_connections shared_buffers effective_cache_size maintenance_work_mem
|
|
16
|
+
checkpoint_completion_target wal_buffers default_statistics_target
|
|
17
|
+
random_page_cost effective_io_concurrency work_mem huge_pages
|
|
18
|
+
jit wal_compression min_wal_size max_wal_size
|
|
19
|
+
)
|
|
20
|
+
elsif server_version_num >= 100000
|
|
21
|
+
%i(
|
|
22
|
+
max_connections shared_buffers effective_cache_size maintenance_work_mem
|
|
23
|
+
checkpoint_completion_target wal_buffers default_statistics_target
|
|
24
|
+
random_page_cost effective_io_concurrency work_mem huge_pages
|
|
25
|
+
wal_compression min_wal_size max_wal_size
|
|
12
26
|
)
|
|
13
27
|
elsif server_version_num >= 90500
|
|
14
28
|
%i(
|
data/lib/pghero/version.rb
CHANGED
data/lib/pghero.rb
CHANGED
|
@@ -79,13 +79,13 @@ module PgHero
|
|
|
79
79
|
# use method instead of attr_accessor to ensure
|
|
80
80
|
# this works if variable set after PgHero is loaded
|
|
81
81
|
def username
|
|
82
|
-
@username ||=
|
|
82
|
+
@username ||= (file_config || {})["username"] || ENV["PGHERO_USERNAME"]
|
|
83
83
|
end
|
|
84
84
|
|
|
85
85
|
# use method instead of attr_accessor to ensure
|
|
86
86
|
# this works if variable set after PgHero is loaded
|
|
87
87
|
def password
|
|
88
|
-
@password ||=
|
|
88
|
+
@password ||= (file_config || {})["password"] || ENV["PGHERO_PASSWORD"]
|
|
89
89
|
end
|
|
90
90
|
|
|
91
91
|
# config pattern for https://github.com/ankane/pghero/issues/424
|
|
@@ -151,7 +151,7 @@ module PgHero
|
|
|
151
151
|
|
|
152
152
|
if databases.empty?
|
|
153
153
|
databases["primary"] = {
|
|
154
|
-
"url" => ENV["PGHERO_DATABASE_URL"]
|
|
154
|
+
"url" => ENV["PGHERO_DATABASE_URL"]
|
|
155
155
|
}
|
|
156
156
|
end
|
|
157
157
|
|
|
@@ -168,11 +168,6 @@ module PgHero
|
|
|
168
168
|
}
|
|
169
169
|
end
|
|
170
170
|
|
|
171
|
-
# private
|
|
172
|
-
def default_connection_config
|
|
173
|
-
connection_config(ActiveRecord::Base) if ActiveRecord::VERSION::STRING.to_f < 7.1
|
|
174
|
-
end
|
|
175
|
-
|
|
176
171
|
# ensure we only have one copy of databases
|
|
177
172
|
# so there's only one connection pool per database
|
|
178
173
|
def databases
|
|
@@ -252,9 +247,8 @@ module PgHero
|
|
|
252
247
|
end
|
|
253
248
|
|
|
254
249
|
# private
|
|
255
|
-
# Rails 7.0 deprecates `include_replicas` for `include_hidden`
|
|
256
250
|
def include_replicas_key
|
|
257
|
-
|
|
251
|
+
:include_hidden
|
|
258
252
|
end
|
|
259
253
|
|
|
260
254
|
private
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: pghero
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.
|
|
4
|
+
version: 3.8.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Andrew Kane
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: activerecord
|
|
@@ -15,14 +15,14 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - ">="
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: '
|
|
18
|
+
version: '7.2'
|
|
19
19
|
type: :runtime
|
|
20
20
|
prerelease: false
|
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
22
|
requirements:
|
|
23
23
|
- - ">="
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
|
-
version: '
|
|
25
|
+
version: '7.2'
|
|
26
26
|
email: andrew@ankane.org
|
|
27
27
|
executables: []
|
|
28
28
|
extensions: []
|
|
@@ -114,14 +114,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
114
114
|
requirements:
|
|
115
115
|
- - ">="
|
|
116
116
|
- !ruby/object:Gem::Version
|
|
117
|
-
version: '3.
|
|
117
|
+
version: '3.3'
|
|
118
118
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
119
119
|
requirements:
|
|
120
120
|
- - ">="
|
|
121
121
|
- !ruby/object:Gem::Version
|
|
122
122
|
version: '0'
|
|
123
123
|
requirements: []
|
|
124
|
-
rubygems_version:
|
|
124
|
+
rubygems_version: 4.0.6
|
|
125
125
|
specification_version: 4
|
|
126
126
|
summary: A performance dashboard for Postgres
|
|
127
127
|
test_files: []
|