Comments (4)
I believe that the db_handler
should reset the "caller" value after ready_for_query
because there can be a situation where the client is linked with another database process, and the old one will continue to send messages.
from supavisor.
@abc3 I can take a stab at this with a bit more info. Are you imagining that while the Client may have "moved on" and is now associated with a new db_handler, the old db_handler - which still has messages incoming for the Client - would stay associated to the Client?
The difficulty I see is I'm not sure how we'll know that the db_handler is done responding to a Client. In a pipelined query, as I mentioned above, we have one incoming request from the Client that is going to instigate two separate db_handler responses, the first of which contains a ready_for_query
.
from supavisor.
Sorry for the late response, it has been a tough week. According to the PostgreSQL documentation, ready_for_query
indicates that the cycle is finished and the current database pool is ready for new queries.
So, after receiving this message, we can be sure that the client's query is finished. We should then clean up data.caller
to avoid scenarios where DbHandler
might receive an asynchronous message and forward it to the last linked client.
Would you like to implement this change?
from supavisor.
fixed in #207
from supavisor.
Related Issues (20)
- Isolate tenant's database HOT 1
- Hosted Supavisor closes connection executing query with large result set HOT 1
- Queries on tables that use CITEXT are 4x slower when using Supavisor vs a direct connection to the db HOT 5
- set up a soft upgrade
- Better error when there is no `.` in the username or tenant `reference` in the `options` params HOT 4
- ClientHandler maximum heap size reached with pg_dump HOT 2
- Deploy supavisor for multiple databases HOT 1
- Custom pool implementation with telemetry
- Maybe switch to local pool DbHandler strategy
- Supabase IP Ban Issue with Connection Pooling HOT 6
- Failed to connect using interval private network Postgres
- Revalidate user secrets if Supavisor isn't allowed to connect to the tenant's database
- Supavisor brings down infrastructure after role modification HOT 4
- Handle `Receive query error`
- Extend Helpers.parse_secret/2 to handle nil or empty secrets
- Specify where to get auth token of user to create first tenant HOT 5
- Docs should mention VAULT_ENC_KEY size needs to be 32 chars HOT 3
- LISTEN / NOTIFY appears to be broken after March 26th
- How to config metrics properly HOT 1
- Create a new Bearer Token HOT 3
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 supavisor.