pg-pglogical 1.1.1 → 2.0.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
  SHA1:
3
- metadata.gz: cc47fb1c124f67c34bc3598d46581c52f0e6c7f5
4
- data.tar.gz: f23bf2966a02ee3a7500df29db376a492a3b78d3
3
+ metadata.gz: 74c18de23fcc3890e16879a1ddbb8224c5470a66
4
+ data.tar.gz: b53e0a41455b66ce23a75f1952323140191ffd33
5
5
  SHA512:
6
- metadata.gz: 4a4a2984356ff7d273e36c2841f2a29600a6f9eaba82b03965e3cab18617164ae27524adcd5a126c55eb9bbdd92e68e525c76b3558413180465973ff49783c11
7
- data.tar.gz: 8e4dea9c8a3ee8834cba848642690e19713561b8761f303086a71a708745c8b675580fb0360966e6820900ca11786fa89bbc4984bb0aaa4c18cad39b5c1bdb94
6
+ metadata.gz: d7ec9d921bedae51ef15f2da54ed01ddb173b29fa68d0527f4862083f84dfce82d53b798b276d986db7f91d04e2c67c5f64b706193c24f2979d5973453382b99
7
+ data.tar.gz: 1eca65e48fd922df09d491dd5fc2667768cec08c66cf56e01fbe8b2850e54853a35ca3d1dae5557f9769c9c282177c3eef58762b435831fc9781fd87a0b0908a
@@ -0,0 +1,40 @@
1
+ ---
2
+ exclude_paths:
3
+ - ".git/"
4
+ - "**.xml"
5
+ - "**.yaml"
6
+ - "**.yml"
7
+ - "spec/"
8
+ - "ci/"
9
+ engines:
10
+ brakeman:
11
+ # very slow :sad_panda:
12
+ enabled: false
13
+ bundler-audit:
14
+ # requires Gemfile.lock
15
+ enabled: false
16
+ duplication:
17
+ enabled: true
18
+ config:
19
+ languages:
20
+ - ruby
21
+ fixme:
22
+ # let's enable later
23
+ enabled: false
24
+ markdownlint:
25
+ # let's enable later
26
+ enabled: false
27
+ rubocop:
28
+ enabled: true
29
+ config: '.rubocop_cc.yml'
30
+ prepare:
31
+ fetch:
32
+ - url: "https://raw.githubusercontent.com/ManageIQ/guides/master/.rubocop_base.yml"
33
+ path: ".rubocop_base.yml"
34
+ - url: "https://raw.githubusercontent.com/ManageIQ/guides/master/.rubocop_cc_base.yml"
35
+ path: ".rubocop_cc_base.yml"
36
+ ratings:
37
+ paths:
38
+ - Gemfile.lock
39
+ - "**.rake"
40
+ - "**.rb"
@@ -0,0 +1,4 @@
1
+ inherit_from:
2
+ - https://raw.githubusercontent.com/ManageIQ/guides/master/.rubocop_base.yml
3
+ # put all local rubocop config into .rubocop_local.yml as it will be loaded by .rubocop_cc.yml as well
4
+ - .rubocop_local.yml
@@ -0,0 +1,5 @@
1
+ inherit_from:
2
+ # this is downloaded by .codeclimate.yml
3
+ - .rubocop_base.yml
4
+ - .rubocop_cc_base.yml
5
+ - .rubocop_local.yml
@@ -0,0 +1,7 @@
1
+ inherit_from:
2
+ - .rubocop_base.yml
3
+ #
4
+ # Overrides
5
+ #
6
+ AllCops:
7
+ TargetRubyVersion: 2.2
@@ -6,14 +6,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
- ## [1.1.1] - 2018-02-28
10
- ### Fixed
11
- - Show all subscriptions defined on global region, even if no corresponding node exists on remote [[#20](https://github.com/ManageIQ/pg-pglogical/pull/20)]
9
+ ## [2.0.0] - 2017-10-11
10
+ ### Changed
11
+ - Alter definitions for pglogical 2.0+ compatibility [[#12](https://github.com/ManageIQ/pg-pglogical/pull/12)]
12
12
 
13
13
  ## [1.1.0] - 2017-02-27
14
14
  ### Added
15
15
  - Add the remote and local lsn to the subscription status [[#8](https://github.com/ManageIQ/pg-pglogical/pull/8)]
16
16
 
17
- [Unreleased]: https://github.com/ManageIQ/pg-pglogical/compare/v1.1.1...HEAD
17
+ [Unreleased]: https://github.com/ManageIQ/pg-pglogical/compare/v2.0.0...HEAD
18
+ [2.0.0]: https://github.com/ManageIQ/pg-pglogical/compare/v1.1.0...v2.0.0
18
19
  [1.1.0]: https://github.com/ManageIQ/pg-pglogical/compare/v1.0.0...v1.1.0
19
- [1.1.1]: https://github.com/ManageIQ/pg-pglogical/compare/v1.1.0...v1.1.1
@@ -179,9 +179,9 @@ module PG
179
179
  #
180
180
  # @param name [String] subscription name
181
181
  # @param table [String] name of the table to resync
182
- def subscription_resync_table(name, table)
183
- typed_exec("SELECT pglogical.alter_subscription_resynchronize_table($1, $2)",
184
- name, table)
182
+ def subscription_resync_table(name, table, truncate = true)
183
+ typed_exec("SELECT pglogical.alter_subscription_resynchronize_table($1, $2, $3)",
184
+ name, table, truncate)
185
185
  end
186
186
 
187
187
  # Adds a replication set to a subscription
@@ -221,7 +221,7 @@ module PG
221
221
  sql = <<-SQL
222
222
  SELECT sub.*, stat.remote_lsn AS remote_replication_lsn, stat.local_lsn AS local_replication_lsn
223
223
  FROM pglogical.show_subscription_status($1) sub
224
- LEFT JOIN pg_replication_origin_status stat
224
+ JOIN pg_replication_origin_status stat
225
225
  ON sub.slot_name = stat.external_id
226
226
  SQL
227
227
 
@@ -277,8 +277,9 @@ module PG
277
277
  # Removes a replication set
278
278
  #
279
279
  # @param set_name [string] replication set name
280
- def replication_set_drop(set_name)
281
- typed_exec("SELECT pglogical.drop_replication_set($1)", set_name)
280
+ # @param ifexists [Boolean] if true an error is not thrown when the replication set does not exist
281
+ def replication_set_drop(set_name, ifexists = false)
282
+ typed_exec("SELECT pglogical.drop_replication_set($1, $2)", set_name, ifexists)
282
283
  end
283
284
 
284
285
  # Adds a table to a replication set
@@ -317,7 +318,7 @@ module PG
317
318
  def tables_in_replication_set(set_name)
318
319
  typed_exec(<<-SQL, set_name).values.flatten
319
320
  SELECT set_reloid
320
- FROM pglogical.replication_set_relation
321
+ FROM pglogical.replication_set_table
321
322
  JOIN pglogical.replication_set
322
323
  USING (set_id)
323
324
  WHERE set_name = $1
@@ -1,5 +1,5 @@
1
1
  module PG
2
2
  module Pglogical
3
- VERSION = "1.1.1".freeze
3
+ VERSION = "2.0.0".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pg-pglogical
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Carboni
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-02-28 00:00:00.000000000 Z
11
+ date: 2017-10-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -90,8 +90,12 @@ executables: []
90
90
  extensions: []
91
91
  extra_rdoc_files: []
92
92
  files:
93
+ - ".codeclimate.yml"
93
94
  - ".gitignore"
94
95
  - ".rspec"
96
+ - ".rubocop.yml"
97
+ - ".rubocop_cc.yml"
98
+ - ".rubocop_local.yml"
95
99
  - ".travis.yml"
96
100
  - CHANGELOG.md
97
101
  - Gemfile
@@ -127,7 +131,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
127
131
  version: '0'
128
132
  requirements: []
129
133
  rubyforge_project:
130
- rubygems_version: 2.6.14
134
+ rubygems_version: 2.6.11
131
135
  signing_key:
132
136
  specification_version: 4
133
137
  summary: A ruby gem for configuring and using pglogical