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

image pgautoupgrade/pgautoupgrade:15-alpine upgrades database to postgres 16 #28

Closed
mx-bernhard opened this issue May 1, 2024 · 5 comments · Fixed by #29
Closed

image pgautoupgrade/pgautoupgrade:15-alpine upgrades database to postgres 16 #28

mx-bernhard opened this issue May 1, 2024 · 5 comments · Fixed by #29
Labels
bug Something isn't working

Comments

@mx-bernhard
Copy link

I thought that pgautoupgrade/pgautoupgrade:15-alpine was just ensuring that after the upgrade the database version was 15 and not 16 and pgautoupgrade/pgautoupgrade:16-alpine was doing the same but with database version 16 as a target. If I change PGTARGET environment variable to 15 before starting the container with image pgautoupgrade/pgautoupgrade:15-alpine, no upgrade is started. This is either a bug or a missing in the documentation (to me, it looks like the former). Starting pgautoupgrade/pgautoupgrade:15-alpine like this yields 16 and not 15:

docker run -it --rm pgautoupgrade/pgautoupgrade:15-alpine /bin/bash                                                                                 127 ↵  ⚡  10313  11:32:04
************************************
PostgreSQL data directory: /var/lib/postgresql/data
************************************
7814a82c00a5:/var/lib/postgresql# echo $PGTARGET
16
7814a82c00a5:/var/lib/postgresql#
@justinclift
Copy link
Member

justinclift commented May 1, 2024

Oh crap. Yeah, 15-alpine is supposed to upgrade stuff to 15, and not past that.

Definitely a bug. We greatly changed the build process for images over the last 2 days in order to enable ARM64. Looks like it's not quite right. ☹️

@andyundso Are you ok to look into this?

@justinclift justinclift added the bug Something isn't working label May 1, 2024
@andyundso
Copy link
Member

very sorry about that, was a mistake by me in the pipeline configuration. fixed with #29.

@justinclift
Copy link
Member

Thanks @andyundso. 😄

Super sorry about that @mx-bernhard. 😦

@andyundso
Copy link
Member

fixed images are now available on Docker Hub.

$ docker pull pgautoupgrade/pgautoupgrade:15-alpine
$ docker run -d -it -e POSTGRES_PASSWORD=password --rm pgautoupgrade/pgautoupgrade:15-alpine
$ docker exec -it jovial_hoover psql -U postgres
psql (15.6)
Type "help" for help.

postgres=# exit

Really sorry about this mistake, I should have checked the Docker layers on Docker Hub and I would have seen the issue beforehand.

@mx-bernhard
Copy link
Author

Nothing bad happened for me, I have backups, as one should. Also, I had time to investigate today. 👍 for fixing so fast.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants