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 +4 -4
- data/.codeclimate.yml +40 -0
- data/.rubocop.yml +4 -0
- data/.rubocop_cc.yml +5 -0
- data/.rubocop_local.yml +7 -0
- data/CHANGELOG.md +5 -5
- data/lib/pg/pglogical/client.rb +8 -7
- data/lib/pg/pglogical/version.rb +1 -1
- metadata +7 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 74c18de23fcc3890e16879a1ddbb8224c5470a66
|
4
|
+
data.tar.gz: b53e0a41455b66ce23a75f1952323140191ffd33
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d7ec9d921bedae51ef15f2da54ed01ddb173b29fa68d0527f4862083f84dfce82d53b798b276d986db7f91d04e2c67c5f64b706193c24f2979d5973453382b99
|
7
|
+
data.tar.gz: 1eca65e48fd922df09d491dd5fc2667768cec08c66cf56e01fbe8b2850e54853a35ca3d1dae5557f9769c9c282177c3eef58762b435831fc9781fd87a0b0908a
|
data/.codeclimate.yml
ADDED
@@ -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"
|
data/.rubocop.yml
ADDED
data/.rubocop_cc.yml
ADDED
data/.rubocop_local.yml
ADDED
data/CHANGELOG.md
CHANGED
@@ -6,14 +6,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
|
6
6
|
|
7
7
|
## [Unreleased]
|
8
8
|
|
9
|
-
## [
|
10
|
-
###
|
11
|
-
-
|
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/
|
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
|
data/lib/pg/pglogical/client.rb
CHANGED
@@ -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
|
-
|
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
|
-
|
281
|
-
|
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.
|
321
|
+
FROM pglogical.replication_set_table
|
321
322
|
JOIN pglogical.replication_set
|
322
323
|
USING (set_id)
|
323
324
|
WHERE set_name = $1
|
data/lib/pg/pglogical/version.rb
CHANGED
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:
|
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:
|
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.
|
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
|