pg_online_schema_change 0.9.8 → 0.9.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +14 -0
- data/Gemfile.lock +26 -19
- data/README.md +3 -4
- data/lib/pg_online_schema_change/client.rb +4 -0
- data/lib/pg_online_schema_change/orchestrate.rb +3 -3
- data/lib/pg_online_schema_change/query.rb +1 -1
- data/lib/pg_online_schema_change/version.rb +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3022588bdf25b1796191894781e530ef8ad7d17648b0bcbabe4a1f3cab307bc0
|
4
|
+
data.tar.gz: 64658e3c7014bd88790ac2a8733f92bc82642bf72144474b7e60393bae3f6d90
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fbc50a101556ec4fdbec07ffc7597e5cbe9ef32b96dc4eab58c97bc43f306b36d9fe6cc3ee6120e1cc3a4a6fb9cba0178ddedf939d01b632ed573de2ebaa8a9e
|
7
|
+
data.tar.gz: 193703bf94240f5403a60e946b533233a6efd8bbb489aa75356073fb9d7c6b0bda597464af8a750959374e270f4d26c23273f12bf586ccec4e8c64c1de63ce11
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,17 @@
|
|
1
|
+
## [0.9.9] - 2024-10-13
|
2
|
+
|
3
|
+
- Validate delta_count value against pull_batch_count by @tanelsuurhans in https://github.com/shayonj/pg-osc/pull/164
|
4
|
+
- Always quote schema names to support uncommon characters like hyphens by @radhikalism in https://github.com/shayonj/pg-osc/pull/166
|
5
|
+
- Bump thor from 1.3.0 to 1.3.2 by @dependabot in https://github.com/shayonj/pg-osc/pull/168
|
6
|
+
- Bump rspec from 3.12.0 to 3.13.0 by @dependabot in https://github.com/shayonj/pg-osc/pull/150
|
7
|
+
- Bump google-protobuf from 3.25.2 to 3.25.5 by @dependabot in https://github.com/shayonj/pg-osc/pull/171
|
8
|
+
- Bump rexml from 3.2.6 to 3.3.6 by @dependabot in https://github.com/shayonj/pg-osc/pull/170
|
9
|
+
- Bump pg from 1.5.4 to 1.5.8 by @dependabot in https://github.com/shayonj/pg-osc/pull/172
|
10
|
+
|
11
|
+
## [0.9.8] - 2024-01-15
|
12
|
+
|
13
|
+
- Dependency updates
|
14
|
+
|
1
15
|
## [0.9.7] - 2024-01-15
|
2
16
|
|
3
17
|
- Introduce the ability to show estimated progress of copy - #146
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
pg_online_schema_change (0.9.
|
4
|
+
pg_online_schema_change (0.9.10)
|
5
|
+
google-protobuf (= 3.25.5)
|
5
6
|
ougai (~> 2.0.0)
|
6
7
|
pg (>= 1.3.2, < 1.6.0)
|
7
8
|
pg_query (>= 2.1.3, < 4.3.0)
|
@@ -12,10 +13,11 @@ GEM
|
|
12
13
|
specs:
|
13
14
|
abbrev (0.1.2)
|
14
15
|
ast (2.4.2)
|
15
|
-
bigdecimal (3.1.
|
16
|
+
bigdecimal (3.1.8)
|
16
17
|
coderay (1.1.3)
|
17
|
-
diff-lcs (1.5.
|
18
|
-
google-protobuf (3.25.
|
18
|
+
diff-lcs (1.5.1)
|
19
|
+
google-protobuf (3.25.5-arm64-darwin)
|
20
|
+
google-protobuf (3.25.5-x86_64-linux)
|
19
21
|
haml (6.3.0)
|
20
22
|
temple (>= 0.8.2)
|
21
23
|
thor
|
@@ -23,15 +25,17 @@ GEM
|
|
23
25
|
json (2.7.1)
|
24
26
|
language_server-protocol (3.17.0.3)
|
25
27
|
method_source (1.0.0)
|
26
|
-
oj (3.16.
|
28
|
+
oj (3.16.6)
|
27
29
|
bigdecimal (>= 3.0)
|
30
|
+
ostruct (>= 0.2)
|
31
|
+
ostruct (0.6.0)
|
28
32
|
ougai (2.0.0)
|
29
33
|
oj (~> 3.10)
|
30
34
|
parallel (1.24.0)
|
31
35
|
parser (3.3.0.4)
|
32
36
|
ast (~> 2.4.1)
|
33
37
|
racc
|
34
|
-
pg (1.5.
|
38
|
+
pg (1.5.8)
|
35
39
|
pg_query (4.2.3)
|
36
40
|
google-protobuf (>= 3.22.3)
|
37
41
|
prettier_print (1.2.1)
|
@@ -44,20 +48,21 @@ GEM
|
|
44
48
|
rbs (3.4.1)
|
45
49
|
abbrev
|
46
50
|
regexp_parser (2.9.0)
|
47
|
-
rexml (3.
|
48
|
-
|
49
|
-
|
50
|
-
rspec-
|
51
|
-
rspec-
|
52
|
-
|
53
|
-
|
54
|
-
|
51
|
+
rexml (3.3.6)
|
52
|
+
strscan
|
53
|
+
rspec (3.13.0)
|
54
|
+
rspec-core (~> 3.13.0)
|
55
|
+
rspec-expectations (~> 3.13.0)
|
56
|
+
rspec-mocks (~> 3.13.0)
|
57
|
+
rspec-core (3.13.1)
|
58
|
+
rspec-support (~> 3.13.0)
|
59
|
+
rspec-expectations (3.13.3)
|
55
60
|
diff-lcs (>= 1.2.0, < 2.0)
|
56
|
-
rspec-support (~> 3.
|
57
|
-
rspec-mocks (3.
|
61
|
+
rspec-support (~> 3.13.0)
|
62
|
+
rspec-mocks (3.13.2)
|
58
63
|
diff-lcs (>= 1.2.0, < 2.0)
|
59
|
-
rspec-support (~> 3.
|
60
|
-
rspec-support (3.
|
64
|
+
rspec-support (~> 3.13.0)
|
65
|
+
rspec-support (3.13.1)
|
61
66
|
rubocop (1.60.0)
|
62
67
|
json (~> 2.3)
|
63
68
|
language_server-protocol (>= 3.17.0)
|
@@ -87,6 +92,7 @@ GEM
|
|
87
92
|
rubocop-capybara (~> 2.17)
|
88
93
|
rubocop-factory_bot (~> 2.22)
|
89
94
|
ruby-progressbar (1.13.0)
|
95
|
+
strscan (3.1.0)
|
90
96
|
syntax_tree (6.2.0)
|
91
97
|
prettier_print (>= 1.2.0)
|
92
98
|
syntax_tree-haml (4.0.3)
|
@@ -98,7 +104,7 @@ GEM
|
|
98
104
|
rbs
|
99
105
|
syntax_tree (>= 2.0.1)
|
100
106
|
temple (0.10.3)
|
101
|
-
thor (1.3.
|
107
|
+
thor (1.3.2)
|
102
108
|
tilt (2.3.0)
|
103
109
|
unicode-display_width (2.5.0)
|
104
110
|
|
@@ -106,6 +112,7 @@ PLATFORMS
|
|
106
112
|
arm64-darwin-20
|
107
113
|
arm64-darwin-21
|
108
114
|
arm64-darwin-22
|
115
|
+
arm64-darwin-23
|
109
116
|
x86_64-linux
|
110
117
|
|
111
118
|
DEPENDENCIES
|
data/README.md
CHANGED
@@ -60,7 +60,6 @@ https://hub.docker.com/r/shayonj/pg-osc
|
|
60
60
|
## Requirements
|
61
61
|
|
62
62
|
- PostgreSQL 9.6 and later
|
63
|
-
- Ruby 2.6 and later
|
64
63
|
- Database user should have permissions for `TRIGGER` and/or a `SUPERUSER`
|
65
64
|
|
66
65
|
## Usage
|
@@ -257,14 +256,14 @@ docker run --network host -it --rm shayonj/pg-osc:latest \
|
|
257
256
|
|
258
257
|
## Development
|
259
258
|
|
260
|
-
- Install ruby 3.
|
259
|
+
- Install ruby 3.3.0
|
261
260
|
|
262
261
|
```
|
263
262
|
\curl -sSL https://get.rvm.io | bash
|
264
263
|
|
265
|
-
rvm install 3.
|
264
|
+
rvm install 3.3.0
|
266
265
|
|
267
|
-
rvm use 3.
|
266
|
+
rvm use 3.3.0
|
268
267
|
```
|
269
268
|
|
270
269
|
- Spin up postgres via Docker Compose - `docker compose up`
|
@@ -54,6 +54,10 @@ module PgOnlineSchemaChange
|
|
54
54
|
raise Error, "Not a valid ALTER statement: #{@alter_statement}"
|
55
55
|
end
|
56
56
|
|
57
|
+
if delta_count > pull_batch_count
|
58
|
+
raise Error, "Value for delta_count should be smaller than the value for pull_batch_count"
|
59
|
+
end
|
60
|
+
|
57
61
|
return if Query.same_table?(@alter_statement)
|
58
62
|
|
59
63
|
raise Error, "All statements should belong to the same table: #{@alter_statement}"
|
@@ -16,7 +16,7 @@ module PgOnlineSchemaChange
|
|
16
16
|
sql = <<~SQL
|
17
17
|
SET statement_timeout = 0;
|
18
18
|
SET client_min_messages = warning;
|
19
|
-
SET search_path TO #{client.schema};
|
19
|
+
SET search_path TO "#{client.schema}";
|
20
20
|
SQL
|
21
21
|
|
22
22
|
Query.run(client.connection, sql)
|
@@ -301,13 +301,13 @@ module PgOnlineSchemaChange
|
|
301
301
|
def run_analyze!
|
302
302
|
logger.info("Performing ANALYZE!")
|
303
303
|
|
304
|
-
client.connection.async_exec("ANALYZE VERBOSE #{client.schema}.#{client.table_name};")
|
304
|
+
client.connection.async_exec("ANALYZE VERBOSE \"#{client.schema}\".#{client.table_name};")
|
305
305
|
end
|
306
306
|
|
307
307
|
def run_vacuum!
|
308
308
|
logger.info("Performing VACUUM!")
|
309
309
|
|
310
|
-
client.connection.async_exec("VACUUM VERBOSE #{client.schema}.#{client.table_name};")
|
310
|
+
client.connection.async_exec("VACUUM VERBOSE \"#{client.schema}\".#{client.table_name};")
|
311
311
|
end
|
312
312
|
|
313
313
|
def validate_constraints!
|
@@ -328,7 +328,7 @@ module PgOnlineSchemaChange
|
|
328
328
|
run(client.connection, query) do |result|
|
329
329
|
definitions =
|
330
330
|
result.map do |row|
|
331
|
-
{ "#{row["schema_name"]}.#{row["view_name"]}" => row["view_definition"].strip }
|
331
|
+
{ "\"#{row["schema_name"]}\".#{row["view_name"]}" => row["view_definition"].strip }
|
332
332
|
end
|
333
333
|
end
|
334
334
|
|
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pg_online_schema_change
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shayon Mukherjee
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-10-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: google-protobuf
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 3.25.5
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 3.25.5
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: ougai
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|