pg_logical_replicator 0.1.0 → 0.1.2
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/lib/pg_logical_replicator/cli.rb +4 -3
- data/lib/pg_logical_replicator/version.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 852eb5d62a8dc6fffbb614962fe51b7566861273c52726bf546c20c74844b6e4
|
4
|
+
data.tar.gz: a266b7f03ee0e9ceda86c9acaeb50d4d03d00c75b40a05fb23b73f6adef02d60
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f7d0119c23c3b190a28851c7c976817aba9393cbd8146624c42f3456b78f047be4afb62059109de1c1172292df0fdf9a92ef4cfd6925297bb145fbba52a750e8
|
7
|
+
data.tar.gz: 5de087ec30bf35dc712e0879fe32f30bea1f13ae408ab356b95cd815b290efa8eef8dec7d79516172b491cbd7e9083391a727d6a0a31e4fa1a6c43fe94c6d92f
|
@@ -34,7 +34,7 @@ module PgLogicalReplicator
|
|
34
34
|
target_rep_username = options[:target_rep_username] || target_username
|
35
35
|
target_rep_password = options[:target_rep_password] || target_password
|
36
36
|
num_slots = options[:num_slots]
|
37
|
-
target_groups = options[:groups]
|
37
|
+
target_groups = options[:groups].map(&:to_i) if options[:groups]
|
38
38
|
|
39
39
|
conn = PG.connect(dbname: source_database, user: source_username, password: source_password, host: source_host, port: source_port)
|
40
40
|
|
@@ -42,7 +42,6 @@ module PgLogicalReplicator
|
|
42
42
|
|
43
43
|
tables = begin
|
44
44
|
result = conn.exec(query)
|
45
|
-
puts "List of tables in the 'public' schema:"
|
46
45
|
result.map { |row| row['tablename'] }
|
47
46
|
ensure
|
48
47
|
conn.close if conn
|
@@ -55,6 +54,8 @@ module PgLogicalReplicator
|
|
55
54
|
dump_dir_root = "~/db-dumps-#{Time.now.strftime('%Y%m%d%H%M%S')}"
|
56
55
|
system("mkdir -p #{dump_dir_root}")
|
57
56
|
|
57
|
+
puts "Target Groups: #{target_groups}"
|
58
|
+
|
58
59
|
tables.each_slice(tables_per_group).with_index do |table_group, group_idx|
|
59
60
|
puts "Processing group #{group_idx + 1} size: #{table_group.size}"
|
60
61
|
|
@@ -141,4 +142,4 @@ module PgLogicalReplicator
|
|
141
142
|
).transfer
|
142
143
|
end
|
143
144
|
end
|
144
|
-
end
|
145
|
+
end
|
@@ -1,3 +1,3 @@
|
|
1
1
|
module PgLogicalReplicator
|
2
|
-
VERSION = "0.1.
|
3
|
-
end
|
2
|
+
VERSION = "0.1.2"
|
3
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pg_logical_replicator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- eni9889
|
@@ -118,7 +118,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
118
118
|
- !ruby/object:Gem::Version
|
119
119
|
version: '0'
|
120
120
|
requirements: []
|
121
|
-
rubygems_version: 3.1
|
121
|
+
rubygems_version: 3.0.3.1
|
122
122
|
signing_key:
|
123
123
|
specification_version: 4
|
124
124
|
summary: PostgreSQL logical replication setup tool
|