This repository was archived by the owner on Jan 14, 2025. It is now read-only.
Commit ad35fb6
Support for physical and logical replication
This patch was implemented by Petros Angelatos and Jeff Davis
to support physical and logical replication in rust-postgres
(see rust-postgres#752).
The original PR never made it to the upstream, but we
(Neon) still use it in our own fork of rust-postgres.
The following commits were squashed together:
* Image configuration updates.
* Make simple_query::encode() pub(crate).
* decoding logic for replication protocol
* Connection string config for replication.
* add copy_both_simple method
* helper ReplicationStream type for replication protocol
This can be optionally used with a CopyBoth stream to decode the
replication protocol
* decoding logic for logical replication protocol
* helper LogicalReplicationStream type to decode logical replication
* add postgres replication integration test
* add simple query versions of copy operations
* replication: use SystemTime for timestamps at API boundary
Co-authored-by: Petros Angelatos <[email protected]>
Co-authored-by: Jeff Davis <[email protected]>
Co-authored-by: Dmitry Ivanov <[email protected]>1 parent 7bc27ca commit ad35fb6
File tree
16 files changed
+1502
-21
lines changed- docker
- postgres-protocol
- src
- message
- tokio-postgres
- src
- tests/test
16 files changed
+1502
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
| |||
82 | 83 | | |
83 | 84 | | |
84 | 85 | | |
| 86 | + | |
85 | 87 | | |
86 | 88 | | |
87 | 89 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
| 18 | + | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
| |||
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
30 | 37 | | |
31 | 38 | | |
32 | 39 | | |
| |||
0 commit comments