Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade rust-postgres and support single-packet queries? #5025

Open
tmm1 opened this issue Oct 26, 2024 · 2 comments
Open

upgrade rust-postgres and support single-packet queries? #5025

tmm1 opened this issue Oct 26, 2024 · 2 comments

Comments

@tmm1
Copy link

tmm1 commented Oct 26, 2024

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: sfackler/rust-postgres#1147

cc @aqrln
cc #5017

@tmm1
Copy link
Author

tmm1 commented Oct 28, 2024

cc @janpio sfackler/rust-postgres#1067 (comment)

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.

@aqrln
Copy link
Member

aqrln commented Oct 28, 2024

Oh, I just realized this also solves the problem of the traceparent comment invalidating prepared statement cache with tracing enabled, wonderful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants