Skip to content

Do pg_upgrade after changing postgres version#179

Open
tribela wants to merge 3 commits into
dokku:masterfrom
tribela:fix-upgrade
Open

Do pg_upgrade after changing postgres version#179
tribela wants to merge 3 commits into
dokku:masterfrom
tribela:fix-upgrade

Conversation

@tribela

@tribela tribela commented May 3, 2019

Copy link
Copy Markdown

Related with: #178

@tribela

tribela commented May 3, 2019

Copy link
Copy Markdown
Author

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

@josegonzalez

Copy link
Copy Markdown
Member

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

@tribela

tribela commented May 3, 2019

Copy link
Copy Markdown
Author

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
Copy Markdown
Member

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

@tdeck

tdeck commented Jan 14, 2020

Copy link
Copy Markdown

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

tbuehl commented Mar 3, 2020

Copy link
Copy Markdown

Would be great to have this in the code

@josegonzalez

Copy link
Copy Markdown
Member

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

@tbuehl

tbuehl commented Mar 3, 2020

Copy link
Copy Markdown

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
Copy Markdown
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

tbuehl commented Mar 3, 2020

Copy link
Copy Markdown

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
Copy Markdown
Member

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

@EmilStenstrom

Copy link
Copy Markdown

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
Copy Markdown

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