pgoutput-client 0.2.2 → 0.2.3
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/CHANGELOG.md +22 -0
- data/lib/pgoutput/client/runner.rb +14 -4
- data/lib/pgoutput/client/version.rb +1 -1
- data/sig/pgoutput/client/runner.rbs +4 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a375cce8bbb2d330974bfd22bdc0a7542c1c1ed5fe73f448e41bba717532aac2
|
|
4
|
+
data.tar.gz: 3c20c8e182548d5556d4a8a503a92d2d8c89d5c926a59eaaf537812d4bb5cdca
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 78fc7ede75ae5fcd4b27adddef61d1f6b59ba8a26943bb44bf93d0dc5f2d97a477f36d12ec935fdf083792cbc8d37418e0b2a9f84fb7d14d15aa7e5847f8d2fd
|
|
7
|
+
data.tar.gz: 58ea9e8475789846b3caad462fcfef693df07ad8ef9cf724e877f38ba2ca53a73b3e1476971a7b5b1c9ad47bb0b8c20fae2e31f47674a377bf03c7d09cb1533c
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,28 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 0.2.3 - 2026-06-17
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
* Fixed automatic replication slot creation when `auto_create_slot` is enabled.
|
|
10
|
+
* Fixed startup failure when the configured replication slot already exists.
|
|
11
|
+
* Improved logical replication restart behavior for persistent replication slots.
|
|
12
|
+
* Improved lifecycle management of existing replication slots across process and container restarts.
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
|
|
16
|
+
* `auto_create_slot` now follows **ensure slot exists** semantics.
|
|
17
|
+
* Existing replication slots are treated as valid and reusable when automatic slot creation is enabled.
|
|
18
|
+
* Slot creation remains automatic for missing slots and idempotent for existing slots.
|
|
19
|
+
|
|
20
|
+
### Internal
|
|
21
|
+
|
|
22
|
+
* Hardened replication slot lifecycle handling.
|
|
23
|
+
* Expanded coverage around automatic slot creation scenarios.
|
|
24
|
+
* Updated signatures and tests for slot creation behavior.
|
|
25
|
+
|
|
26
|
+
|
|
5
27
|
## 0.2.2 - 2026-06-17
|
|
6
28
|
|
|
7
29
|
### Added
|
|
@@ -194,14 +194,24 @@ module Pgoutput
|
|
|
194
194
|
private
|
|
195
195
|
|
|
196
196
|
def setup_connection(connection)
|
|
197
|
-
if configuration.auto_create_slot && !@slot_created
|
|
198
|
-
connection.create_replication_slot
|
|
199
|
-
@slot_created = true
|
|
200
|
-
end
|
|
197
|
+
ensure_replication_slot(connection) if configuration.auto_create_slot && !@slot_created
|
|
201
198
|
|
|
202
199
|
connection.start_replication
|
|
203
200
|
end
|
|
204
201
|
|
|
202
|
+
def ensure_replication_slot(connection)
|
|
203
|
+
connection.create_replication_slot
|
|
204
|
+
@slot_created = true
|
|
205
|
+
rescue ConnectionError => e
|
|
206
|
+
raise unless replication_slot_already_exists?(e)
|
|
207
|
+
|
|
208
|
+
@slot_created = true
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
def replication_slot_already_exists?(error)
|
|
212
|
+
error.message.match?(/replication slot .* already exists/i)
|
|
213
|
+
end
|
|
214
|
+
|
|
205
215
|
def run_stream_cycle(configuration, &block)
|
|
206
216
|
connection = Connection.open(configuration)
|
|
207
217
|
setup_connection(connection)
|
|
@@ -83,6 +83,10 @@ module Pgoutput
|
|
|
83
83
|
|
|
84
84
|
def setup_connection: (untyped connection) -> untyped
|
|
85
85
|
|
|
86
|
+
def ensure_replication_slot: (untyped connection) -> untyped
|
|
87
|
+
|
|
88
|
+
def replication_slot_already_exists?: (untyped error) -> bool
|
|
89
|
+
|
|
86
90
|
def run_stream_cycle: (untyped configuration) { (?) -> untyped } -> untyped
|
|
87
91
|
|
|
88
92
|
def configuration_for_resume: () -> untyped
|