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
Remove --no-comments
from Postgres structure dump command
#44633
Conversation
Reverts rails#43216 Fixes rails#44498 Per the discussion at rails#44603 (comment), reverting the feature as it's not clear it should be the default. Users who don't want comments in structure dumps can use `ActiveRecord::Tasks::DatabaseTasks.structure_dump_flags = ['--no-comment']`.
--no-comments
from Postgres structure dumps--no-comments
from Postgres structure dump command
Remove `--no-comments` from Postgres structure dump command
this restores a state where i'm not sure how common the scenario is, but i think all PaaS take the secure approach of avoiding superusers, and comments are not just "custom"-made but also automatically generated when using pg extensions, so it could be quite common. if so, maybe the unclear error message ( |
Anecdotally, we use RDS for both production and development, and we have never come across this issue. Could you share a bit more info on how to replicate and in what environment this is happening for you? |
do you mean Amazon RDS? i suspect you're either not using extensions or using a superuser account then? by PaaS i meant full platforms like Heroku. i encountered the problem with Scalingo (Heroku clone), postgres 12, and the extension browsing through the available extensions here and looking at their so i guess it should be possible to reproduce the problem by creating a Heroku app, adding postgres, and adding any extension as described here. and of course setting up a rails app and integrating it with that. i still have the monkeypatch protecting me from this revert, so i'm not eager to do all of this at the moment 😁 |
But when are you running |
yeah. it's kind of a whitelabel app with multiple deployments, that's why its a recurring problem for us. |
Ahhh, that makes more sense. I think the typical use case for most apps would not have them running |
As a note, the addition of We also want to have comments in our DB as that's why we added them :-) Just wanted to note that it's not just an inconvenience, and there is a config option to fix it; whereas the inverse was actually unresolvable for us :-) Just in case anyone considers reversing this in the future, our vote would be "please don't" :-D |
Any chance to get this released? I was surprised to see that it was omitted from the 7.0.2.3 release? |
7.0.2.3 was a security release, so it didn't include any bug fixes. I would expect to see this in 7.0.3 (you can point your Gemfile at |
Reverts #43216
Fixes #44498
Per the discussion at #44603 (comment), reverting the feature as it's not clear it should be the default. Users who don't want comments in structure dumps can use
ActiveRecord::Tasks::DatabaseTasks.structure_dump_flags = ['--no-comment']
.