Comments (1)
Hi @dvarrazzo The thing is this is a sync backend, and DatabaseWrapper
instances are created per-thread. So it means that I have 1 pool per thread. The pool is actually not needed at all because 1 thread only needs 1 connection at a time.
But I use the pool here as a logical entity. Because even if you need only one connection, that connection also has a lifetime after which it should be recreated, the health checks should be made from time to time, etc - the very same things you do to connections in the pool. So I need the pool just to reuse the logic of working with a single connection.
Now, about the size: I think, size=1 corresponds to the current logic of django's own postgresql backend. But you can probably have 2 connections when you know 1 connection is about to die so that to return the new connection immediately. But that is kind of optimisation.
from vinyl_v1.
Related Issues (8)
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 vinyl_v1.