-
-
Notifications
You must be signed in to change notification settings - Fork 201
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
Option to avoid setting default_transaction_read_only
when connecting to PostgreSQL?
#966
Comments
@JackDunnNZ well that's a bit annoying. Thanks for the report. We don't currently have a way to config the default RuntimeConfig. The point of this config was to make tegola read only by default as it does not need to make any mutations to the database. Does RDSProxy support a similar query param, or do they just suggest using database roles for this type of control? |
Thanks, it is super annoying that it doesn't support - I entirely agree the tegola config makes sense! In certain configurations, RDS Proxy supports marking an entire endpoint as read-only, which provides some of this control. If I had to guess, because the purpose of the proxy is to pool and reuse connections across multiple client connections to the proxy, it cannot set global parameters like |
I see, yes that would be a direct conflict with the current approach. Maybe we add a new config option to omit the default runtime params. The main downside in your situation would be the loss of setting the application name on the connection, which I think is really helpful. Looking at the pgx PraseConfig docs it appears the package "ParseConfig closely matches the parsing behavior of libpq". Looking at the libpq docs, 34.1.1. Connection Strings, it appears the param Could you do some additional investigation to see if this is a viable solution when working with the RDS Proxy? |
Sure, happy to. I didn't follow from the message, what exactly would you like me test? |
@JackDunnNZ I'm hoping you can investigate what query params RDS Proxy supports. I suspect they have a whitelist documented somewhere. |
@ARolek Got it, looks like that whitelist is here: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-proxy-setup.html#rds-proxy-connecting-postgresql |
@JackDunnNZ thanks! so it looks like |
@ARolek Normally I would be happy to, but I don't know a single thing about go, so I think it would be better for someone else to handle it sorry. |
@JackDunnNZ fair enough ;-). |
application_name and default_transaction_read_only to be configurable Closes: go-spatial#966
i gave it a shot and made both You can either set while i can test that the runtime params are correctly set, i cannot test their effect. any chance you can checkout my PR, test and let me know? @JackDunnNZ |
Works perfectly on my end, thanks @iwpnd ! |
application_name and default_transaction_read_only to be configurable Closes: go-spatial#966 fix: compare default_transaction_read_only with uppercase chore: use const for runtime param keys, update readme
application_name and default_transaction_read_only to be configurable Closes: go-spatial#966 fix: compare default_transaction_read_only with uppercase chore: use const for runtime param keys, update readme
application_name and default_transaction_read_only to be configurable Closes: #966 fix: compare default_transaction_read_only with uppercase chore: use const for runtime param keys, update readme
I am trying to connect to a postgres instance on AWS RDS that sits behind an RDS Proxy. When I try to connect, I get the following error:
If I comment out the line that sets this parameter and build, everything works fine.
I am wondering if it might be possible to have a configurable override to avoid setting this parameter so that it's not necessary to patch and build from source to achieve this?
The text was updated successfully, but these errors were encountered: