bb8
bb8 copied to clipboard
Full-featured async (tokio-based) postgres connection pool (like r2d2)
I have the following code: ```rust #[derive(Debug)] struct ConnectionCustomizer {} #[async_trait] impl bb8_postgres::bb8::CustomizeConnection for ConnectionCustomizer { async fn on_acquire( &self, connection: & mut bb8_postgres::tokio_postgres::Client, ) -> Result { println!("test"); Ok(())...
If a user incorrectly specifies their connection setting (e.g. typos the IP address), then bb8's `get` method will hit errors and retry until the timeout. Is there a way of...
Would be nice if bb8-postgres supported calling [`DISCARD ALL`](https://www.postgresql.org/docs/12/sql-discard.html) after the connection is returned to the pool, so it's guaranteed to be "pristine" on the next checkout. Unless I'm missing...
First of all thank you for the recent update to bb8 :-) I can never turn a conn in into a pubsub connection calling `into_pubsub` for some reason. Have you...
Hi, this issue is conceptually linked to https://github.com/sfackler/r2d2-postgres/issues/19 The problem is related to the fact that the `PostgresConnectionManager` struct has a generic parameter ``. If `` is known at compile-time,...
The `dedicated_connection()` function returns `M::Connection`. For `bb8-postgres`, this type maps to the `tokio_postgres::Client` type. However, for receiving `LISTEN` notifications from `postgres`, we need the `tokio_postgres::Connection` value. Is there some way...
Maybe I'm wrong here, but the way I see to prepare statements currently, you would call prepare, get back the statement and use it. I don't see, eyeing the code,...
Hello, I'm trying to make a transaction, but I am hitting a wall and can't figure it out. Is it possible for an example with transaction and 2 inserts for...
Potential fix for https://github.com/djc/bb8/issues/154 ### Problem `InternalsGuard` is problematic because of the deadlock. Using a `ReentrantLock` is not possible because both `put` and `drop` are holding a mutable reference to...
Fixes #146.