-
-
Notifications
You must be signed in to change notification settings - Fork 98
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
Run migrating script during upgrade command #178
Comments
Unfortunately, I am super unlikely to implement a fix here due to lack of time. If you'd like to contribute the change, that would be excellent. Please note that this sort of thing is kinda weird because you need to update the data for every major/minor version upgrade. We might actually need to do a dump/restore to make it work... |
I agree that dump/restore method is more graceful(But has more downtime). I'll look for that |
I think even the method you posted has extended downtime, so not sure we can do this easily :( |
what is the best way to run pg_upgrade manually after the migration? the dokku created container seems restarting in a loop after the upgrade |
@Kjwon15 How did you end up solving your issue? I'm stuck with a seemingly inaccessible container now and cannot access the data… |
So here's what I ended up doing:
From now on I'll make sure to |
Update: Use the method described here instead: 5855d1b I made the same mistake, and rendered by database unusable because of the I tried to use the steps outlined above to get things rolled back again, but had to add few things. Here's the full list if anyone else encounters this:
Now, when you copied over the data directory, the old password for the database user was copied with it. But the postgers:create step created a new user and password. So now the password set in DATABASE_URL does not match the one in the database. Let's change that.
NOW you're ready to link the app again:
|
I'm also having a problem here. I have a request: whilst this is outstanding; can the upgrade section of the readme be updated to make people aware of this issue? |
Here's what I just got working for a 11->12 upgrade:
But I'm not sure: will this work on all version upgrades? I think sometimes there is export files version incompatibility? |
@odscjames In you instructions: Maybe keep the old database until you verified that the import works? |
@EmilStenstrom Sure - I was just pointing out a general route. My main request is still that this is put in the readme, as it's a signifiant "gotcha". |
Thank you @odscjames. It works 11 => 13.2 |
There is a pull request open for doing the tianon-based upgrade, and the upgrade process is documented as of 5855d1b. Going to close this for now, but feel free to comment in the PR (or create an alternative to keep it moving). |
dokku postgres:upgrade <service>
command just changing docker image tag. And it causes error like this:upgrade
subcommand should run migration script like this before starting new containerThe text was updated successfully, but these errors were encountered: