pg_online_schema_change 0.9.8 → 0.9.9

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: aed221e19c7fe40cf5a34844625c78b02c56fe13aff7f65183a1cff717185ad7
4
- data.tar.gz: 81d3a564f43ebf08a7cac37fddd9a035d253e6dcc8c1c5d178c3c247e6357bc0
3
+ metadata.gz: e19d4d76c1e353f68cf4d3b2445e2d33ebcf5a9f3a5c1f0e11df7097f424922e
4
+ data.tar.gz: 6cc247ef07804aa1d9edf24d057013b8e697583a13c59d212eb7c816210ac5b1
5
5
  SHA512:
6
- metadata.gz: 5a4cfb3e17d007803cb84cf0686cadcfd0e7f7734ad20f6f5fa8b71a5198a24569a390ef3173f7bb518e345c7c4931c10812c053535d1df20ba774382c239f80
7
- data.tar.gz: f82f723f5cac41a77c6adec6ddaa83c0377b172b3b283c05f1b81e7538c8427e182cdbac1db53e9358b39842685403b3a6e85cdb5a0371b6bffeef608e67a690
6
+ metadata.gz: 61a3ffd9f77ade00ca8818b66c5415152ef570eb4581f92a69d7ce67fb60042362021995fd7653b73f78a95f1b793d6f39ae5d3831a014fd365cd0102c5954aa
7
+ data.tar.gz: e26f96ef36a0147d533651d0193bdd5fd680b72b973f6d50db5246d65217ff982c233259eb8724c9d223d15bbdaae57c78f916b08c2b94f51a56a8ab92964678
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## [0.9.8] - 2024-01-15
2
+
3
+ - Dependency updates
4
+
1
5
  ## [0.9.7] - 2024-01-15
2
6
 
3
7
  - Introduce the ability to show estimated progress of copy - #146
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- pg_online_schema_change (0.9.8)
4
+ pg_online_schema_change (0.9.9)
5
5
  ougai (~> 2.0.0)
6
6
  pg (>= 1.3.2, < 1.6.0)
7
7
  pg_query (>= 2.1.3, < 4.3.0)
@@ -12,10 +12,15 @@ GEM
12
12
  specs:
13
13
  abbrev (0.1.2)
14
14
  ast (2.4.2)
15
- bigdecimal (3.1.5)
15
+ bigdecimal (3.1.8)
16
16
  coderay (1.1.3)
17
- diff-lcs (1.5.0)
18
- google-protobuf (3.25.2)
17
+ diff-lcs (1.5.1)
18
+ google-protobuf (4.28.2-arm64-darwin)
19
+ bigdecimal
20
+ rake (>= 13)
21
+ google-protobuf (4.28.2-x86_64-linux)
22
+ bigdecimal
23
+ rake (>= 13)
19
24
  haml (6.3.0)
20
25
  temple (>= 0.8.2)
21
26
  thor
@@ -23,15 +28,17 @@ GEM
23
28
  json (2.7.1)
24
29
  language_server-protocol (3.17.0.3)
25
30
  method_source (1.0.0)
26
- oj (3.16.3)
31
+ oj (3.16.6)
27
32
  bigdecimal (>= 3.0)
33
+ ostruct (>= 0.2)
34
+ ostruct (0.6.0)
28
35
  ougai (2.0.0)
29
36
  oj (~> 3.10)
30
37
  parallel (1.24.0)
31
38
  parser (3.3.0.4)
32
39
  ast (~> 2.4.1)
33
40
  racc
34
- pg (1.5.4)
41
+ pg (1.5.8)
35
42
  pg_query (4.2.3)
36
43
  google-protobuf (>= 3.22.3)
37
44
  prettier_print (1.2.1)
@@ -44,20 +51,21 @@ GEM
44
51
  rbs (3.4.1)
45
52
  abbrev
46
53
  regexp_parser (2.9.0)
47
- rexml (3.2.6)
48
- rspec (3.12.0)
49
- rspec-core (~> 3.12.0)
50
- rspec-expectations (~> 3.12.0)
51
- rspec-mocks (~> 3.12.0)
52
- rspec-core (3.12.2)
53
- rspec-support (~> 3.12.0)
54
- rspec-expectations (3.12.3)
54
+ rexml (3.3.6)
55
+ strscan
56
+ rspec (3.13.0)
57
+ rspec-core (~> 3.13.0)
58
+ rspec-expectations (~> 3.13.0)
59
+ rspec-mocks (~> 3.13.0)
60
+ rspec-core (3.13.1)
61
+ rspec-support (~> 3.13.0)
62
+ rspec-expectations (3.13.3)
55
63
  diff-lcs (>= 1.2.0, < 2.0)
56
- rspec-support (~> 3.12.0)
57
- rspec-mocks (3.12.6)
64
+ rspec-support (~> 3.13.0)
65
+ rspec-mocks (3.13.2)
58
66
  diff-lcs (>= 1.2.0, < 2.0)
59
- rspec-support (~> 3.12.0)
60
- rspec-support (3.12.1)
67
+ rspec-support (~> 3.13.0)
68
+ rspec-support (3.13.1)
61
69
  rubocop (1.60.0)
62
70
  json (~> 2.3)
63
71
  language_server-protocol (>= 3.17.0)
@@ -87,6 +95,7 @@ GEM
87
95
  rubocop-capybara (~> 2.17)
88
96
  rubocop-factory_bot (~> 2.22)
89
97
  ruby-progressbar (1.13.0)
98
+ strscan (3.1.0)
90
99
  syntax_tree (6.2.0)
91
100
  prettier_print (>= 1.2.0)
92
101
  syntax_tree-haml (4.0.3)
@@ -98,7 +107,7 @@ GEM
98
107
  rbs
99
108
  syntax_tree (>= 2.0.1)
100
109
  temple (0.10.3)
101
- thor (1.3.0)
110
+ thor (1.3.2)
102
111
  tilt (2.3.0)
103
112
  unicode-display_width (2.5.0)
104
113
 
@@ -106,6 +115,7 @@ PLATFORMS
106
115
  arm64-darwin-20
107
116
  arm64-darwin-21
108
117
  arm64-darwin-22
118
+ arm64-darwin-23
109
119
  x86_64-linux
110
120
 
111
121
  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.1.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.1.3
264
+ rvm install 3.3.0
266
265
 
267
- rvm use 3.1.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
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PgOnlineSchemaChange
4
- VERSION = "0.9.8"
4
+ VERSION = "0.9.9"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pg_online_schema_change
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.8
4
+ version: 0.9.9
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-01-15 00:00:00.000000000 Z
11
+ date: 2024-10-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ougai