pgoutput-client 0.2.0 → 0.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1413514b4a4dbe4f3c0f4c59744931ed865ca6faea5662f33844c0786a46e287
4
- data.tar.gz: ebb972e2f0dd5a40f46161d6cd5be70df2f42db42e05862edf16f11e0f9a15ef
3
+ metadata.gz: f4b5412d12b81f8e787d00975419c7478af45fb47d0fa0f616876a9141f47396
4
+ data.tar.gz: 9a77f1cbb0c438312fdefa4045f89f2359829751a96e6131f20ffc9ce4ccc6b2
5
5
  SHA512:
6
- metadata.gz: 7cb26f20d9a5a86c231956cb801c98b269aeebcf969dc2408b8ded3dbcae9a1b7995f88179480cbdd59c6f99b9d5df9d7910db78f0d84175d74fcc7e1ac6a0f5
7
- data.tar.gz: 93a66bfe718e050fc636c77e78dcc1dd8c8bce064d64794f982944e9dc7a83ed261e3831a88d91ce1a6acb4c2498a5506135d815a8f6d278f5ff1fda168dc868
6
+ metadata.gz: e067f71e70ade6f7cf25d543edbfac7f79058e6a8b79a35457a6320365e574d7c8c12ecbdecd74355eff1aa641eabde1c926e74dc52513e7a1ad101461a7375d
7
+ data.tar.gz: e66ed2183b869dc7074595fc2509763d5da468ddd7f21a5ed10617990405da21b720df5131de01771beaed5532970073eed56bbbd1517a40bb271019b34f8af9
data/CHANGELOG.md CHANGED
@@ -2,6 +2,49 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.2.2 - 2026-06-17
6
+
7
+ ### Added
8
+
9
+ * Added periodic standby status feedback while replication streams are idle.
10
+ * Added E2E coverage for PostgreSQL restart and replication recovery.
11
+ * Added E2E validation of replication slot resume behavior after reconnect.
12
+ * Added test coverage for idle replication streams.
13
+
14
+ ### Changed
15
+
16
+ * Increased reconnect retry budget to better tolerate PostgreSQL restart windows.
17
+ * Improved replication stream resilience during transient PostgreSQL outages.
18
+ * Improved reconnect behavior when PostgreSQL is starting up and temporarily rejecting connections.
19
+
20
+ ### Fixed
21
+
22
+ * Fixed replication timeout during idle logical replication streams.
23
+
24
+ * Fixed walsender termination caused by missing standby feedback during periods without WAL activity.
25
+
26
+ * Fixed reconnect handling after PostgreSQL restart.
27
+
28
+ * Fixed connection recovery when PostgreSQL reports:
29
+
30
+ ```
31
+ FATAL: the database system is starting up
32
+ ```
33
+
34
+ * Fixed E2E PostgreSQL test infrastructure and restart recovery validation.
35
+
36
+ * Fixed test isolation between unit and E2E PostgreSQL connection paths.
37
+
38
+ ### Internal
39
+
40
+ * Expanded transport lifecycle validation.
41
+ * Improved operational reliability of long-running replication sessions.
42
+
43
+
44
+ ## [0.2.1] - 2026-06-16
45
+
46
+ - Gemspec summary and description improvement release only
47
+
5
48
  ## [0.2.0] - 2026-06-16
6
49
 
7
50
  ### Fixed
data/README.md CHANGED
@@ -367,4 +367,4 @@ bundle exec rake e2e:run
367
367
 
368
368
  ## License
369
369
 
370
- MIT.
370
+ [MIT](LICENSE.txt).
@@ -37,7 +37,7 @@ module Pgoutput
37
37
  # @see Stream
38
38
  # @api public
39
39
  class Runner
40
- DEFAULT_RECONNECT_ATTEMPTS = 3
40
+ DEFAULT_RECONNECT_ATTEMPTS = 30
41
41
  DEFAULT_RECONNECT_BACKOFF = 0.5
42
42
 
43
43
  # Configuration used by this runner.
@@ -70,6 +70,7 @@ module Pgoutput
70
70
  @resume_lsn = configuration.start_lsn
71
71
  @acked_lsn = configuration.start_lsn
72
72
  @slot_created = false
73
+ @connected_once = false
73
74
  @last_error = nil
74
75
  @reconnect_attempts = 0
75
76
  end
@@ -204,15 +205,17 @@ module Pgoutput
204
205
  def run_stream_cycle(configuration, &block)
205
206
  connection = Connection.open(configuration)
206
207
  setup_connection(connection)
208
+ @connected_once = true
207
209
  @stream = Stream.new(connection:, configuration:, acked_lsn: @acked_lsn)
208
210
  @stream.start(&block)
209
211
  :done
210
212
  rescue ConnectionError => e
211
213
  @last_error = e
212
- raise if @stopped || @stream.nil?
214
+ raise if @stopped
215
+ raise if @stream.nil? && !@connected_once
213
216
 
214
- @resume_lsn = @stream.latest_lsn || @resume_lsn
215
- @acked_lsn = @stream.acked_lsn || @acked_lsn
217
+ @resume_lsn = @stream&.latest_lsn || @resume_lsn
218
+ @acked_lsn = @stream&.acked_lsn || @acked_lsn
216
219
  :retry
217
220
  ensure
218
221
  @stream = nil
@@ -78,6 +78,7 @@ module Pgoutput
78
78
  while @running
79
79
  copy_data = @connection.get_copy_data
80
80
  if copy_data.nil?
81
+ send_periodic_feedback
81
82
  sleep 0.01
82
83
  next
83
84
  end
@@ -5,6 +5,6 @@ module Pgoutput
5
5
  # Current pgoutput-client gem version.
6
6
  #
7
7
  # @return [String]
8
- VERSION = "0.2.0"
8
+ VERSION = "0.2.2"
9
9
  end
10
10
  end
@@ -53,7 +53,7 @@ module Pgoutput
53
53
 
54
54
  @reconnect_attempts: untyped
55
55
 
56
- DEFAULT_RECONNECT_ATTEMPTS: 3
56
+ DEFAULT_RECONNECT_ATTEMPTS: 30
57
57
 
58
58
  DEFAULT_RECONNECT_BACKOFF: ::Float
59
59
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pgoutput-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ken C. Demanawa
@@ -23,8 +23,18 @@ dependencies:
23
23
  - - "~>"
24
24
  - !ruby/object:Gem::Version
25
25
  version: '1.6'
26
- description: Transport-only PostgreSQL logical replication client for receiving pgoutput
27
- CopyData payloads.
26
+ description: |
27
+ pgoutput-client provides a PostgreSQL logical replication transport for Ruby.
28
+
29
+ It manages replication connections, lifecycle, monitoring,
30
+ keepalive handling, graceful shutdown, and transport-level
31
+ acknowledgment boundaries while streaming pgoutput messages
32
+ to downstream consumers.
33
+
34
+ pgoutput-client owns transport.
35
+
36
+ Parsers, decoders, source adapters, runtimes, and sinks remain
37
+ separate concerns within the CDC ecosystem.
28
38
  email:
29
39
  - kenneth.c.demanawa@gmail.com
30
40
  executables: []
@@ -86,5 +96,6 @@ required_rubygems_version: !ruby/object:Gem::Requirement
86
96
  requirements: []
87
97
  rubygems_version: 3.6.9
88
98
  specification_version: 4
89
- summary: PostgreSQL pgoutput logical replication transport client.
99
+ summary: PostgreSQL pgoutput logical replication transport and lifecycle management
100
+ for Ruby.
90
101
  test_files: []