mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-05 20:42:54 +00:00
Our rust-postgres fork is getting messy. Mostly because proxy wants more
control over the raw protocol than tokio-postgres provides. As such,
it's diverging more and more. Storage and compute also make use of
rust-postgres, but in more normal usage, thus they don't need our crazy
changes.
Idea:
* proxy maintains their subset
* other teams use a minimal patch set against upstream rust-postgres
Reviewing this code will be difficult. To implement it, I
1. Copied tokio-postgres, postgres-protocol and postgres-types from
00940fcdb5
2. Updated their package names with the `2` suffix to make them compile
in the workspace.
3. Updated proxy to use those packages
4. Copied in the code from tokio-postgres-rustls 0.13 (with some patches
applied https://github.com/jbg/tokio-postgres-rustls/pull/32
https://github.com/jbg/tokio-postgres-rustls/pull/33)
5. Removed as much dead code as I could find in the vendored libraries
6. Updated the tokio-postgres-rustls code to use our existing channel
binding implementation
22 lines
627 B
TOML
22 lines
627 B
TOML
[package]
|
|
name = "tokio-postgres2"
|
|
version = "0.1.0"
|
|
edition = "2018"
|
|
license = "MIT/Apache-2.0"
|
|
|
|
[dependencies]
|
|
async-trait.workspace = true
|
|
bytes.workspace = true
|
|
byteorder.workspace = true
|
|
fallible-iterator.workspace = true
|
|
futures-util = { workspace = true, features = ["sink"] }
|
|
log = "0.4"
|
|
parking_lot.workspace = true
|
|
percent-encoding = "2.0"
|
|
pin-project-lite.workspace = true
|
|
phf = "0.11"
|
|
postgres-protocol2 = { path = "../postgres-protocol2" }
|
|
postgres-types2 = { path = "../postgres-types2" }
|
|
tokio = { workspace = true, features = ["io-util", "time", "net"] }
|
|
tokio-util = { workspace = true, features = ["codec"] }
|