Skip to content
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

Altering DATABASE_URL is *not* recommended #167

Closed
msakrejda opened this issue Apr 13, 2013 · 4 comments
Closed

Altering DATABASE_URL is *not* recommended #167

msakrejda opened this issue Apr 13, 2013 · 4 comments

Comments

@msakrejda
Copy link

This section makes recommendations that are at odds with what we at Heroku recommend. We do need to update DATABASE_URL occasionally (most notably in case of a hardware failure), and when that happens, we do not account for the existing value, meaning that any and all query string parameters are lost. I've started a discussion with my colleagues on whether we can do better here, but in the meantime, this is not a good recommendation, given that your DATABASE_URL may be replaced by us if necessary.

@eprothro
Copy link
Contributor

Fine with me, happy to pull that portion of the config code and section in the wiki.

I inferred that was a Heroku-approved recommendation, as the database.yml y'all inject includes the same code to apply query params from the DATABASE_URL to the database connection config.

Thanks for letting me know.

@eprothro
Copy link
Contributor

I've added a note that this is not recommended to that wiki page.

If this support is removed from the Heroku build behavior, I'll pull it from the recommended Heroku configuration. For now, it seems best to at least mimc the behavior of the primary database connection configuration. Happy to discuss if you disagree, thanks again.

@msakrejda
Copy link
Author

Awesome, thanks for the quick response. I'll admit our behavior with respect to DATABASE_URL and database.yml is a little schizophrenic--technically, the add-on provider contract allows the provider to change the URL (actually hardware failure is less common--consider something like a pg:credentials --reset), but the build packs don't really consider that.

We could probably just do a substring replacement, rather than changing the string wholesale, but we're moving to a model where users will have no control over config vars added by an add-on, but we'll provide some principled way to deal with database query string issues before we do that.

@thiagopradi
Copy link
Owner

So, closing this issue. any problems, please reopen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants