Skip to content

Does not work with official postgres:10 due to shutdown issues #15

Closed
@EugenMayer

Description

@EugenMayer

First off, thank you SO much for your work here - incredible!

Today i tried to upgrade from postgres:10 to postgres:11 - so using the official images. The problem is actually, that there seem to be no way to "cleanly" shutdown the "old" docker container so that this "counts" for pg_upgrade to be a clean shutdown and thus allow the migration.

What i had to do is (pg10 stands for your current docker container running pg old):

docker exec -it pg10 bash
su - postgres
export PGDATA=/var/lib/postgresql/data
/usr/lib/postgresql/10/bin/pg_ctl stop

This will now properly shutdown the container. Everything else goes just as you described in the README.md

docker run --rm  --name upgrade -u postgres -v /host/db/10:/var/lib/postgresql/10/data -v /host/db/11:/var/lib/postgresql/11/data tianon/postgres-upgrade:10-to-11

I am not sure we can fix the former (stop issue) here in the docker image automatically, but we can at least add it to the readme. What do you think?

Again, thank you so much!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions