Comments (5)
Might be nice to have a look at other pooling solutions (r2d2, deadpool, sqlx) and see if/how they support this.
(Note that previously we recommended that LISTEN queries should probably be issued on non-pooled connections, through Pool::dedicated_connection()
.)
from bb8.
PgBouncer has it configurable (server_reset_query
) but it defaults to DISCARD ALL
. PgBouncer is probably the gold standard when it comes to Postgres pooling.
It’s really not about the LISTEN, but all (currently 9) resources this releases. Another nice thing is that it fails if the connection is inside a transaction, so it helps automatically check that you’re closing them correctly.
I think it needs to be configurable, otherwise you loose the ability to share use prepared statements etc. Choose your own isolation level...
from bb8.
I was referring mostly to Rust crates.
I'm unlikely to have time for this any time soon unless someone is willing to pay for it. Will review hooks for this in the connection manager trait, though.
from bb8.
Yes, I think hooks are key rather than supporting every single possible reset query. Then one can subclass the postgres manager and do what they want.
from bb8.
#89 added a way to customize connections at the start of the lifetime rather than the end, which should help with this.
from bb8.
Related Issues (20)
- Time taken to get a connection from bb8 redis pool is very high HOT 2
- Unable to use bb8-redis pool connection to execute `query_async` commands on redis HOT 3
- Why bb8-redis can't support redis features? HOT 3
- ACL support for redis HOT 2
- Error sink not called unless debugger is attached with breakpoints HOT 2
- Reentrant deadlock HOT 5
- Reaper default frequency conflicts with other settings
- Unable to connect to secure client using bb8-redis HOT 2
- TimedOut error when has_broken = true HOT 8
- add a tag for v0.8.1 HOT 2
- Expose internal connection type in some way HOT 2
- Support for pool creation without requiring initial connection HOT 2
- Unusually slow to give redis connections HOT 7
- Close pool and all connections? HOT 1
- Support for pool creation with concurrent connections creation HOT 5
- Attempt to subtract with overflow, new version 8.2 HOT 5
- Timeout Issue with bb8-redis 0.14.0 on GCP Memorystore Redis HOT 5
- Changelog HOT 1
- Remove async-trait in favor of impl trait and native async in impls HOT 6
- Support async behavior to determine if the connection is no longer usable in ManageConnection Trait HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bb8.