-
Notifications
You must be signed in to change notification settings - Fork 271
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
Allow more database.yml settings #1194
Comments
For my own interest: https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNECT-TARGET-SESSION-ATTRS
Something I've been thinking about recently is just exposing a database URL parameter instead of each component. That gives a lot more freedom for these things. However, it would have a lot more consequences like needing to write migrations and properly test it so I haven't started it. Any thoughts on this matter? |
I think parameter for the "default" things (host,port,username,password,etc...) definitely has it's worth for simplicity's sake for most setups. Hence why I suggested a
or even just a |
I'm slightly more of a fan of |
Added a PR with |
@ekohl anything missing in the PR for it to get reviewed & merged? |
We need to be able to set the
target_session_attrs
parameter indatabase.yml
(which is a connection parameter for libpq), but this is currently not supported. I'm open to making a PR, but unsure if there is a preference for adding aString $db_target_session_attrs
parameter, or just a genericHash[String, String] $db_extra_options
parameter, which we can then use to set any option.I am aware that
target_session_attrs
is not documented in foreman or rails docs, but from https://github.com/rails/rails/blob/main/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb#L47 , any parameter not documented there, will be passed as libpq connection parameter.The text was updated successfully, but these errors were encountered: