mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-15 01:12:56 +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
56 lines
1.9 KiB
TOML
56 lines
1.9 KiB
TOML
# This file contains settings for `cargo hakari`.
|
|
# See https://docs.rs/cargo-hakari/latest/cargo_hakari/config for a full list of options.
|
|
|
|
hakari-package = "workspace_hack"
|
|
|
|
# Format for `workspace-hack = ...` lines in other Cargo.tomls. Requires cargo-hakari 0.9.8 or above.
|
|
dep-format-version = "4"
|
|
|
|
# Setting workspace.resolver = "2" in the root Cargo.toml is HIGHLY recommended.
|
|
# Hakari works much better with the new feature resolver.
|
|
# For more about the new feature resolver, see:
|
|
# https://blog.rust-lang.org/2021/03/25/Rust-1.51.0.html#cargos-new-feature-resolver
|
|
# Have to keep the resolver still here since hakari requires this field,
|
|
# despite it's now the default for 2021 edition & cargo.
|
|
resolver = "2"
|
|
|
|
# Add triples corresponding to platforms commonly used by developers here.
|
|
# https://doc.rust-lang.org/rustc/platform-support.html
|
|
platforms = [
|
|
# "x86_64-unknown-linux-gnu",
|
|
# "x86_64-apple-darwin",
|
|
# "x86_64-pc-windows-msvc",
|
|
]
|
|
|
|
[final-excludes]
|
|
workspace-members = [
|
|
# vm_monitor benefits from the same Cargo.lock as the rest of our artifacts, but
|
|
# it is built primarly in separate repo neondatabase/autoscaling and thus is excluded
|
|
# from depending on workspace-hack because most of the dependencies are not used.
|
|
"vm_monitor",
|
|
# All of these exist in libs and are not usually built independently.
|
|
# Putting workspace hack there adds a bottleneck for cargo builds.
|
|
"compute_api",
|
|
"consumption_metrics",
|
|
"desim",
|
|
"metrics",
|
|
"pageserver_api",
|
|
"postgres_backend",
|
|
"postgres_connection",
|
|
"postgres_ffi",
|
|
"pq_proto",
|
|
"remote_storage",
|
|
"safekeeper_api",
|
|
"tenant_size_model",
|
|
"tracing-utils",
|
|
"utils",
|
|
"wal_craft",
|
|
"walproposer",
|
|
"postgres-protocol2",
|
|
"postgres-types2",
|
|
"tokio-postgres2",
|
|
]
|
|
|
|
# Write out exact versions rather than a semver range. (Defaults to false.)
|
|
# exact-versions = true
|