postgres-vacuum-monitor 0.7.0 → 0.11.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: 592f695cd74785fd4ab69842efe03d5e22a9cebb5ffbaeb5fe04464e0115374b
4
- data.tar.gz: 5e7742f52d74cd2abd69befbbf7e66359b108a811bbaba50fa5b36889793681c
3
+ metadata.gz: 6c398c3078e1b811e2f20aa747a7163089a18983b27a0f8717bbf0b31c3d6168
4
+ data.tar.gz: b1fd3ddf77ae9486cf3ed321d47485a69d7f2d6cf219a9281edc33a4defbd3ce
5
5
  SHA512:
6
- metadata.gz: d5a79c0d3bcea4003b28dd74ca89aea9c89e0a55219a66712db91709c35995615fa0d965288210cd09261b1f1be66c8dc710701498c1ca4a9e56f7e08893e478
7
- data.tar.gz: bd177531dd058f581a3a4c325a1a3fc283fd74c05780bab7bff1c3e541a71fff5d848c03d76546432b931f030b243800aaea382bc4a16cdb932c771ac6b8c8fe
6
+ metadata.gz: 6c622be7d73d1ffe0232b98e05268aec917681b39e703f5fc82d1fab39faf2117669654e982bf6a04ac12849e2f6b18d33a8d6e98256f4bcaf7afa2d2244471f
7
+ data.tar.gz: cc422931d00b068cd17354f8fb74dafea4e31bd1fb0a1db94f5c769f505ad8fa14a8a94b681ddb14521336ea2b21b4a10c20cd9e1c1060861e803a1a6a20093e
@@ -0,0 +1,83 @@
1
+ version: 2.1
2
+ jobs:
3
+ lint:
4
+ docker:
5
+ - image: salsify/ruby_ci:2.5.8
6
+ working_directory: ~/postgres-vacuum-monitor
7
+ steps:
8
+ - checkout
9
+ - restore_cache:
10
+ keys:
11
+ - v1-gems-ruby-2.5.8-{{ checksum "postgres-vacuum-monitor.gemspec" }}-{{ checksum "Gemfile" }}
12
+ - v1-gems-ruby-2.5.8-
13
+ - run:
14
+ name: Install Gems
15
+ command: |
16
+ if ! bundle check --path=vendor/bundle; then
17
+ bundle install --path=vendor/bundle --jobs=4 --retry=3
18
+ bundle clean
19
+ fi
20
+ - save_cache:
21
+ key: v1-gems-ruby-2.5.8-{{ checksum "postgres-vacuum-monitor.gemspec" }}-{{ checksum "Gemfile" }}
22
+ paths:
23
+ - "vendor/bundle"
24
+ - "gemfiles/vendor/bundle"
25
+ - run:
26
+ name: Run Rubocop
27
+ command: bundle exec rubocop --config .rubocop.yml
28
+ test:
29
+ parameters:
30
+ gemfile:
31
+ type: string
32
+ docker:
33
+ - image: salsify/ruby_ci:2.5.8
34
+ environment:
35
+ TEST_DATABASE_URL: postgresql://circleci@localhost/circle_test
36
+ - image: circleci/postgres:9.6
37
+ environment:
38
+ POSTGRES_USER: "ubuntu"
39
+ POSTGRES_DB: "postgres_vacuum_monitor_test"
40
+ POSTGRES_HOST_AUTH_METHOD: "trust"
41
+ environment:
42
+ RACK_ENV: "test"
43
+ DB_HOST: 'localhost'
44
+ DB_USER: 'ubuntu'
45
+ RAILS_ENV: "test"
46
+ CIRCLE_TEST_REPORTS: "test-results"
47
+ BUNDLE_GEMFILE: << parameters.gemfile >>
48
+ working_directory: ~/postgres-vacuum-monitor
49
+ steps:
50
+ - checkout
51
+ - restore_cache:
52
+ keys:
53
+ - v1-gems-ruby-2.5.8-{{ checksum "postgres-vacuum-monitor.gemspec" }}-{{ checksum "<< parameters.gemfile >>" }}
54
+ - v1-gems-ruby-2.5.8-
55
+ - run:
56
+ name: Install Gems
57
+ command: |
58
+ if ! bundle check --path=vendor/bundle; then
59
+ bundle install --path=vendor/bundle --jobs=4 --retry=3
60
+ bundle clean
61
+ fi
62
+ - save_cache:
63
+ key: v1-gems-ruby-2.5.8-{{ checksum "postgres-vacuum-monitor.gemspec" }}-{{ checksum "<< parameters.gemfile >>" }}
64
+ paths:
65
+ - "vendor/bundle"
66
+ - "gemfiles/vendor/bundle"
67
+ - run:
68
+ name: Run Tests
69
+ command: |
70
+ bundle exec rspec --format RspecJunitFormatter --out $CIRCLE_TEST_REPORTS/rspec/junit.xml --format progress spec
71
+ - store_test_results:
72
+ path: "test-results"
73
+ workflows:
74
+ build:
75
+ jobs:
76
+ - lint
77
+ - test:
78
+ matrix:
79
+ parameters:
80
+ gemfile:
81
+ - "gemfiles/activerecord_5_2.gemfile"
82
+ - "gemfiles/activerecord_6_0.gemfile"
83
+ - "gemfiles/activerecord_6_1.gemfile"
data/.gitignore CHANGED
@@ -9,5 +9,6 @@
9
9
  *.iml
10
10
  .idea/
11
11
  Gemfile.lock
12
- log/*.log
13
12
  gemfiles/*.gemfile.lock
13
+ gemfiles/.bundle/
14
+ log/
@@ -3,3 +3,6 @@ inherit_gem:
3
3
 
4
4
  AllCops:
5
5
  TargetRubyVersion: 2.4
6
+ Exclude:
7
+ - 'vendor/**/*'
8
+ - 'gemfiles/**/*'
data/Appraisals CHANGED
@@ -1,7 +1,13 @@
1
- appraise 'activerecord-5' do
2
- gem 'activerecord', '< 6.0.0'
1
+ # frozen_string_literal: true
2
+
3
+ appraise 'activerecord_5_2' do
4
+ gem 'activerecord', '~> 5.2.0'
5
+ end
6
+
7
+ appraise 'activerecord_6_0' do
8
+ gem 'activerecord', '~> 6.0.0'
3
9
  end
4
10
 
5
- appraise 'activerecord-6' do
6
- gem 'activerecord', '< 6.1'
11
+ appraise 'activerecord_6_1' do
12
+ gem 'activerecord', '~> 6.1.0'
7
13
  end
@@ -1,4 +1,20 @@
1
1
  # postgres-vacuum-monitor
2
+
3
+ ## v.11.0
4
+ - Add support for rails 6.1
5
+
6
+ ## v.10.1
7
+ - Query bug fix.
8
+
9
+ ## v.10.0
10
+ - Add events for connection idle time and state.
11
+
12
+ ## v.0.9.0
13
+ - Add the application name in the event.
14
+
15
+ ## v.0.8.0
16
+ - Report on queries that are being blocked by another process.
17
+
2
18
  ## v.0.7.0
3
19
  - Lower the default `LongTransactions` threshold from 1 hour to 5 minutes and make this configurable via
4
20
  the `long_running_transaction_threshold_seconds` setting.
data/Gemfile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source 'https://rubygems.org'
2
4
 
3
5
  git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- [![Build Status](https://travis-ci.org/salsify/postgres-vacuum-monitor.svg?branch=master)](https://travis-ci.org/salsify/postgres-vacuum-monitor)
1
+ [![Build Status](https://circleci.com/gh/salsify/postgres-vacuum-monitor.svg?style=svg)][circleci]
2
2
  [![Maintainability](https://api.codeclimate.com/v1/badges/9ced178ca8fee231a935/maintainability)](https://codeclimate.com/github/salsify/postgres-vacuum-monitor/maintainability)
3
3
  [![Coverage Status](https://coveralls.io/repos/github/salsify/postgres-vacuum-monitor/badge.svg?branch=master)](https://coveralls.io/github/salsify/postgres-vacuum-monitor?branch=master)
4
4
 
data/Rakefile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'bundler/gem_tasks'
2
4
  require 'bundler/setup'
3
5
  Bundler::GemHelper.install_tasks
@@ -1,7 +1,8 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
- require "bundler/setup"
4
- require "postgres/vacuum/monitor"
4
+ require 'bundler/setup'
5
+ require 'postgres/vacuum/monitor'
5
6
 
6
7
  # You can add fixtures and/or initialization code here to make experimenting
7
8
  # with your gem easier. You can also use a different console, if you like.
@@ -10,5 +11,5 @@ require "postgres/vacuum/monitor"
10
11
  # require "pry"
11
12
  # Pry.start
12
13
 
13
- require "irb"
14
+ require 'irb'
14
15
  IRB.start(__FILE__)
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ # This file was generated by Appraisal
4
+
5
+ source 'https://rubygems.org'
6
+
7
+ # ActiveRecord is used to connect to DBs
8
+ gem 'activerecord', '~> 5.2.0'
9
+
10
+ gemspec path: '../'
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ # This file was generated by Appraisal
4
+
5
+ source 'https://rubygems.org'
6
+
7
+ # ActiveRecord is used to connect to DBs
8
+ gem 'activerecord', '~> 6.0.0'
9
+
10
+ gemspec path: '../'
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ # This file was generated by Appraisal
4
+
5
+ source 'https://rubygems.org'
6
+
7
+ # ActiveRecord is used to connect to DBs
8
+ gem 'activerecord', '~> 6.1.0'
9
+
10
+ gemspec path: '../'
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Postgres
4
+ module Vacuum
5
+ class Compatibility
6
+ ACTIVE_RECORD_VERSION = ::Gem::Version.new(::ActiveRecord::VERSION::STRING).release
7
+ PRE_RAILS_6_1 = ACTIVE_RECORD_VERSION < ::Gem::Version.new('6.1.0')
8
+
9
+ def self.pre_rails_6_1?
10
+ PRE_RAILS_6_1
11
+ end
12
+
13
+ end
14
+ end
15
+ end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Postgres
2
4
  module Vacuum
3
5
  class Configuration
@@ -1,10 +1,15 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Postgres
2
4
  module Vacuum
3
5
  module Jobs
4
6
  class MonitorJob
5
7
 
6
- AUTOVACUUM_LAGGING_EVENT = 'AutoVacuumLagging'.freeze
7
- LONG_TRANSACTIONS = 'LongTransactions'.freeze
8
+ AUTOVACUUM_LAGGING_EVENT = 'AutoVacuumLagging'
9
+ LONG_TRANSACTIONS = 'LongTransactions'
10
+ BLOCKED_QUERIES = 'BlockedQueries'
11
+ CONNECTION_STATE = 'ConnectionState'
12
+ CONNECTION_IDLE_TIME = 'ConnectionIdleTime'
8
13
 
9
14
  def perform(*)
10
15
  with_each_db_name_and_connection do |name, connection|
@@ -33,6 +38,38 @@ module Postgres
33
38
  tuples_over_limit: row['dead_tuples'].to_i - row['autovacuum_vacuum_tuples'].to_i
34
39
  )
35
40
  end
41
+
42
+ connection.execute(Postgres::Vacuum::Monitor::Query.blocked_queries).each do |row|
43
+ reporter_class.report_event(
44
+ BLOCKED_QUERIES,
45
+ database_name: name,
46
+ blocked_pid: row['blocked_pid'],
47
+ blocked_application: row['blocked_application'],
48
+ blocked_statement: row['blocked_statement'],
49
+ blocking_pid: row['blocking_pid'],
50
+ blocking_application: row['blocking_application'],
51
+ current_statement_in_blocking_process: row['current_statement_in_blocking_process']
52
+ )
53
+ end
54
+
55
+ connection.execute(Postgres::Vacuum::Monitor::Query.connection_state).each do |row|
56
+ reporter_class.report_event(
57
+ CONNECTION_STATE,
58
+ database_name: name,
59
+ state: row['state'],
60
+ connection_count: row['connection_count']
61
+ )
62
+ end
63
+
64
+ connection.execute(Postgres::Vacuum::Monitor::Query.connection_idle_time).each do |row|
65
+ reporter_class.report_event(
66
+ CONNECTION_IDLE_TIME,
67
+ database_name: name,
68
+ max: row['max'],
69
+ median: row['median'],
70
+ percentile_90: row['percentile_90']
71
+ )
72
+ end
36
73
  end
37
74
 
38
75
  true
@@ -42,7 +79,9 @@ module Postgres
42
79
  return @reporter_class_name if @reporter_class_name
43
80
 
44
81
  @reporter_class_name = Postgres::Vacuum::Monitor.configuration.monitor_reporter_class_name&.safe_constantize
45
- raise ConfigurationError.new('Missing or invalid report class name. Check your configuration') if @reporter_class_name.nil?
82
+ if @reporter_class_name.nil?
83
+ raise ConfigurationError.new('Missing or invalid report class name. Check your configuration')
84
+ end
46
85
 
47
86
  @reporter_class_name
48
87
  end
@@ -50,7 +89,12 @@ module Postgres
50
89
  def with_each_db_name_and_connection
51
90
  databases = Set.new
52
91
  ActiveRecord::Base.connection_handler.connection_pools.map do |connection_pool|
53
- db_name = connection_pool.spec.config[:database]
92
+ db_name = if Postgres::Vacuum::Compatibility.pre_rails_6_1?
93
+ connection_pool.spec.config[:database]
94
+ else
95
+ connection_pool.db_config.configuration_hash[:database]
96
+ end
97
+
54
98
  # activerecord allocates a connection pool per call to establish_connection
55
99
  # multiple pools might interact with the same database so we use the
56
100
  # database name to dedup
@@ -1,4 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'active_record'
4
+ require 'postgres/vacuum/compatibility'
2
5
  require 'postgres/vacuum/configuration'
3
6
  require 'postgres/vacuum/monitor/version'
4
7
  require 'postgres/vacuum/monitor/query'
@@ -12,7 +15,7 @@ module Postgres
12
15
  end
13
16
 
14
17
  def self.configuration
15
- @config ||= Configuration.new
18
+ @configuration ||= Configuration.new
16
19
  end
17
20
 
18
21
  def self.reset
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Postgres
2
4
  module Vacuum
3
5
  module Monitor
@@ -5,10 +7,10 @@ module Postgres
5
7
  extend self
6
8
 
7
9
  STATES = ["'idle in transaction'", "'active'"].freeze
8
- THRESHOLD_SETTING = "'autovacuum_vacuum_threshold'".freeze
9
- SCALE_FACTOR_SETTING = "'autovacuum_vacuum_scale_factor'".freeze
10
- MAX_AGE_SETTING = "'autovacuum_freeze_max_age'".freeze
11
- PG_CATALOG = "'pg_catalog'".freeze
10
+ THRESHOLD_SETTING = "'autovacuum_vacuum_threshold'"
11
+ SCALE_FACTOR_SETTING = "'autovacuum_vacuum_scale_factor'"
12
+ MAX_AGE_SETTING = "'autovacuum_freeze_max_age'"
13
+ PG_CATALOG = "'pg_catalog'"
12
14
 
13
15
  def long_running_transactions
14
16
  <<-SQL
@@ -67,6 +69,58 @@ module Postgres
67
69
  ORDER BY age(relfrozenxid) DESC LIMIT 50;
68
70
  SQL
69
71
  end
72
+
73
+ def blocked_queries
74
+ # The query was taken from https://wiki.postgresql.org/wiki/Lock_Monitoring
75
+ <<-SQL
76
+ SELECT blocked_locks.pid AS blocked_pid,
77
+ blocked_activity.usename AS blocked_user,
78
+ blocking_locks.pid AS blocking_pid,
79
+ blocking_activity.usename AS blocking_user,
80
+ blocked_activity.query AS blocked_statement,
81
+ blocking_activity.query AS current_statement_in_blocking_process,
82
+ blocked_activity.application_name AS blocked_application,
83
+ blocking_activity.application_name AS blocking_application
84
+ FROM pg_catalog.pg_locks blocked_locks
85
+ JOIN pg_catalog.pg_stat_activity blocked_activity ON blocked_activity.pid = blocked_locks.pid
86
+ JOIN pg_catalog.pg_locks blocking_locks
87
+ ON blocking_locks.locktype = blocked_locks.locktype
88
+ AND blocking_locks.DATABASE IS NOT DISTINCT FROM blocked_locks.DATABASE
89
+ AND blocking_locks.relation IS NOT DISTINCT FROM blocked_locks.relation
90
+ AND blocking_locks.page IS NOT DISTINCT FROM blocked_locks.page
91
+ AND blocking_locks.tuple IS NOT DISTINCT FROM blocked_locks.tuple
92
+ AND blocking_locks.virtualxid IS NOT DISTINCT FROM blocked_locks.virtualxid
93
+ AND blocking_locks.transactionid IS NOT DISTINCT FROM blocked_locks.transactionid
94
+ AND blocking_locks.classid IS NOT DISTINCT FROM blocked_locks.classid
95
+ AND blocking_locks.objid IS NOT DISTINCT FROM blocked_locks.objid
96
+ AND blocking_locks.objsubid IS NOT DISTINCT FROM blocked_locks.objsubid
97
+ AND blocking_locks.pid != blocked_locks.pid
98
+ JOIN pg_catalog.pg_stat_activity blocking_activity ON blocking_activity.pid = blocking_locks.pid
99
+ WHERE NOT blocked_locks.GRANTED;
100
+ SQL
101
+ end
102
+
103
+ def connection_state
104
+ <<-SQL
105
+ SELECT
106
+ state, count(*) as connection_count
107
+ FROM pg_stat_activity
108
+ GROUP BY state
109
+ ORDER BY connection_count DESC;
110
+ SQL
111
+ end
112
+
113
+ def connection_idle_time
114
+ <<-SQL
115
+ SELECT
116
+ max(EXTRACT(EPOCH FROM (CURRENT_TIMESTAMP - state_change))) as max,
117
+ percentile_cont(0.5) within GROUP (ORDER BY EXTRACT(EPOCH FROM (CURRENT_TIMESTAMP - state_change)) DESC) AS median,
118
+ percentile_cont(0.9) within GROUP (ORDER BY EXTRACT(EPOCH FROM (CURRENT_TIMESTAMP - state_change)) DESC) AS percentile_90
119
+ FROM pg_stat_activity
120
+ WHERE state = 'idle'
121
+ LIMIT 1000;
122
+ SQL
123
+ end
70
124
  end
71
125
  end
72
126
  end
@@ -1,7 +1,9 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Postgres
2
4
  module Vacuum
3
5
  module Monitor
4
- VERSION = '0.7.0'.freeze
6
+ VERSION = '0.11.0'
5
7
  end
6
8
  end
7
9
  end
@@ -1,5 +1,6 @@
1
+ # frozen_string_literal: true
1
2
 
2
- lib = File.expand_path('../lib', __FILE__)
3
+ lib = File.expand_path('lib', __dir__)
3
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
5
  require 'postgres/vacuum/monitor/version'
5
6
 
@@ -10,7 +11,7 @@ Gem::Specification.new do |spec|
10
11
  spec.email = ['fgarces@salsify.com']
11
12
 
12
13
  spec.summary = 'Simple stats collector for postgres auto vacuumer.'
13
- spec.description = 'Queries the Active Record DB for information regarding the auto vacuum process and long running queries.'
14
+ spec.description = 'Queries ActiveRecord DBs for info regarding auto vacuum processes and long running queries.'
14
15
  spec.homepage = 'https://github.com/salsify/postgres-vacuum-monitor'
15
16
 
16
17
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
@@ -24,12 +25,13 @@ Gem::Specification.new do |spec|
24
25
 
25
26
  spec.add_development_dependency 'appraisal'
26
27
  spec.add_development_dependency 'bundler'
27
- spec.add_development_dependency 'coveralls'
28
+ spec.add_development_dependency 'coveralls_reborn', '>= 0.18.0'
28
29
  spec.add_development_dependency 'database_cleaner'
29
- spec.add_development_dependency 'rake', '~> 10.0'
30
+ spec.add_development_dependency 'rake'
30
31
  spec.add_development_dependency 'rspec', '~> 3.2'
32
+ spec.add_development_dependency 'rspec_junit_formatter'
31
33
  spec.add_development_dependency 'salsify_rubocop'
32
34
 
33
- spec.add_dependency 'activerecord', '>= 5', '< 6.1'
35
+ spec.add_dependency 'activerecord', '< 6.2.0'
34
36
  spec.add_dependency 'pg', '>= 0.18', '< 2.0'
35
37
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: postgres-vacuum-monitor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fernando Garces
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-02-07 00:00:00.000000000 Z
11
+ date: 2020-12-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: appraisal
@@ -39,19 +39,19 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: coveralls
42
+ name: coveralls_reborn
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: '0'
47
+ version: 0.18.0
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: '0'
54
+ version: 0.18.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: database_cleaner
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -70,16 +70,16 @@ dependencies:
70
70
  name: rake
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
- version: '10.0'
75
+ version: '0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - "~>"
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
- version: '10.0'
82
+ version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rspec
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -95,7 +95,7 @@ dependencies:
95
95
  - !ruby/object:Gem::Version
96
96
  version: '3.2'
97
97
  - !ruby/object:Gem::Dependency
98
- name: salsify_rubocop
98
+ name: rspec_junit_formatter
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - ">="
@@ -109,25 +109,33 @@ dependencies:
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  - !ruby/object:Gem::Dependency
112
- name: activerecord
112
+ name: salsify_rubocop
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - ">="
116
116
  - !ruby/object:Gem::Version
117
- version: '5'
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: activerecord
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
118
129
  - - "<"
119
130
  - !ruby/object:Gem::Version
120
- version: '6.1'
131
+ version: 6.2.0
121
132
  type: :runtime
122
133
  prerelease: false
123
134
  version_requirements: !ruby/object:Gem::Requirement
124
135
  requirements:
125
- - - ">="
126
- - !ruby/object:Gem::Version
127
- version: '5'
128
136
  - - "<"
129
137
  - !ruby/object:Gem::Version
130
- version: '6.1'
138
+ version: 6.2.0
131
139
  - !ruby/object:Gem::Dependency
132
140
  name: pg
133
141
  requirement: !ruby/object:Gem::Requirement
@@ -148,18 +156,18 @@ dependencies:
148
156
  - - "<"
149
157
  - !ruby/object:Gem::Version
150
158
  version: '2.0'
151
- description: Queries the Active Record DB for information regarding the auto vacuum
152
- process and long running queries.
159
+ description: Queries ActiveRecord DBs for info regarding auto vacuum processes and
160
+ long running queries.
153
161
  email:
154
162
  - fgarces@salsify.com
155
163
  executables: []
156
164
  extensions: []
157
165
  extra_rdoc_files: []
158
166
  files:
167
+ - ".circleci/config.yml"
159
168
  - ".gitignore"
160
169
  - ".rspec"
161
170
  - ".rubocop.yml"
162
- - ".travis.yml"
163
171
  - Appraisals
164
172
  - CHANGELOG.md
165
173
  - CODE_OF_CONDUCT.md
@@ -169,8 +177,10 @@ files:
169
177
  - Rakefile
170
178
  - bin/console
171
179
  - bin/setup
172
- - gemfiles/activerecord_5.gemfile
173
- - gemfiles/activerecord_6.gemfile
180
+ - gemfiles/activerecord_5_2.gemfile
181
+ - gemfiles/activerecord_6_0.gemfile
182
+ - gemfiles/activerecord_6_1.gemfile
183
+ - lib/postgres/vacuum/compatibility.rb
174
184
  - lib/postgres/vacuum/configuration.rb
175
185
  - lib/postgres/vacuum/jobs/monitor_job.rb
176
186
  - lib/postgres/vacuum/monitor.rb
@@ -180,7 +190,7 @@ files:
180
190
  homepage: https://github.com/salsify/postgres-vacuum-monitor
181
191
  licenses: []
182
192
  metadata: {}
183
- post_install_message:
193
+ post_install_message:
184
194
  rdoc_options: []
185
195
  require_paths:
186
196
  - lib
@@ -195,8 +205,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
195
205
  - !ruby/object:Gem::Version
196
206
  version: '0'
197
207
  requirements: []
198
- rubygems_version: 3.0.6
199
- signing_key:
208
+ rubygems_version: 3.1.2
209
+ signing_key:
200
210
  specification_version: 4
201
211
  summary: Simple stats collector for postgres auto vacuumer.
202
212
  test_files: []
@@ -1,13 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 2.5.6
4
- - 2.6.3
5
- gemfile:
6
- - gemfiles/activerecord_5.gemfile
7
- - gemfiles/activerecord_6.gemfile
8
- services:
9
- - postgresql
10
- before_script:
11
- - psql -c 'create database postgres_vacuum_monitor_test;' -U postgres
12
- addons:
13
- postgresql: '9.6'
@@ -1,7 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "activerecord", "< 6.0.0"
6
-
7
- gemspec path: "../"
@@ -1,7 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "activerecord", "< 6.1"
6
-
7
- gemspec path: "../"