-
-
Notifications
You must be signed in to change notification settings - Fork 36
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
Example of using pgwire as a postgres proxy #80
Comments
hi @osawyerr , it's possible to write such a proxy but we need to define the purpose of it so we can choose at which layer we will proxy the traffic. For example, we can write a Layer-4 proxy by simply forward any tcp traffic to backend, or a Layer-7 one that understands postgresql's protocol or even sql statements. If I'm creating a basic Layer-7 example, I will let the proxy to finish the startup and forward further query traffic to backend. I will find time for that. |
My vote is for Layer-7. Personally, I'd like to be able to fundamentally understand the request, execute the query, apply transforms to the result rows, then hand them back out. |
I'll 3rd the request for a l7 proxy example, @sunng87 . My use case is an auth n/z aware proxy that can make authorization decisions based on the query. |
Let me do this in weekend if everything goes well. |
Thank you, looking forward to it! |
I have an unfinished proxy example that uses tokio_postgres in However, for a complete proxy solution, we will need to implement tokio layer for using |
I'll +1 this request. My use case is to intercept every message and validate incoming queries. |
We also need this for https://github.com/twentyhq/twenty I've never tried Replit bounties but thought it could be an occasion to give it a shot... Let's see if it works! |
Was looking at the examples and there isn't one that actually connects to a real postgres instance in the backend. For example to use pgwire as a proxy to a 'real' postgres server. i.e. maintaining different client sessions and forwarding them to a real postgres instance.
The text was updated successfully, but these errors were encountered: