Open tmm1 opened 1 month ago
cc @janpio https://github.com/sfackler/rust-postgres/pull/1067#issuecomment-1751500297
We at @prisma would also be very interested in this. Right now, we do a weird dance of wrapping all queries in transactions, and each time deallocating the named prepared statements when talking to a PgBouncer instance in transaction mode - which adds up to 3 additional roundtrips for 1 query and has an obvious very bad effect on our performance.
Oh, I just realized this also solves the problem of the traceparent
comment invalidating prepared statement cache with tracing enabled, wonderful.
the tokio-postgres dep is currently pinned to a 0.7.7 fork: https://github.com/prisma/rust-postgres/commits/pgbouncer-mode/
the latest version is 0.7.11: https://github.com/sfackler/rust-postgres/blob/master/tokio-postgres/CHANGELOG.md
the newer versions include a
query_typed
which reduces the number of network packet roundtrips for a fresh query from 3 to 1: https://github.com/sfackler/rust-postgres/pull/1147cc @aqrln cc #5017