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

Do pg_upgrade after changing postgres version #179

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

tribela
Copy link

@tribela tribela commented May 3, 2019

Related with: #178

@tribela
Copy link
Author

tribela commented May 3, 2019

Do not merge yet.
Need to handle some case like 11.1 to 11.2

@josegonzalez
Copy link
Member

What happens if people are using a custom Postgres image, or if they are upgrading between many versions?

@tribela
Copy link
Author

tribela commented May 3, 2019

tianon/postgres-upgrade supports 9.2 to 11.
And postgres:9.2 and postgres:9.2.4-alpine will treat as same (9.2)

@josegonzalez
Copy link
Member

Right, but what if someone is using some other, random image? I know people do this for geo support.

@tdeck
Copy link

tdeck commented Jan 14, 2020

Just want to put a vote in for this because right now running dokku postgres:upgrade seems to just leave a crash-looping container that I'm not sure how to recover from.

@tbuehl
Copy link

tbuehl commented Mar 3, 2020

Would be great to have this in the code

@josegonzalez
Copy link
Member

Right, but what if someone is using some other, random image? I know people do this for geo support.

@tbuehl
Copy link

tbuehl commented Mar 3, 2020

I'm not sure, but why should pg_upgrade be affected by that?

But if pg_upgrade would be affected, we could add a note to the docs that only standard images are supported for now. I think anything is better than the current state that leaves one with a broken container. (I tried it today with 11.6 to 12.2)

@josegonzalez
Copy link
Member

This uses the tianon/pg-upgrade image for a specific migration, and there aren't always images if people are using custom versions

@tbuehl
Copy link

tbuehl commented Mar 3, 2020

Oh ok, I get it. I still think either adding a note in the docs or restricting the command to standard images would be better than not having it.

@josegonzalez
Copy link
Member

adding the restriction (or maybe a guard around that codeblock with a requisite warning) would be good with me then.

@EmilStenstrom
Copy link

I think adding a restriction when the command won't work is a good way to go about this. I've also broken my site (unknowingly) trying to upgrade postgres.

@lizthegrey
Copy link

This works really great, I upgraded from 9.6 to 15 with this script flawlessly.

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

Successfully merging this pull request may close these issues.

6 participants