tianon / docker-postgres-upgrade

a PoC for using "pg_upgrade" inside Docker -- learn from it, adapt it for your needs; don't expect it to work as-is!
https://hub.docker.com/r/tianon/postgres-upgrade/
MIT License
1.08k stars 116 forks source link

11 to 12 role "postgres" does not exist #21

Closed micemuni closed 5 years ago

micemuni commented 5 years ago

When trying to upgrade from 11 to 12 - the following error pops up:

docker run --rm \
        -e PGUSER=$POSTGRES_USER \
        -e POSTGRES_INITDB_ARGS="-U $POSTGRES_USER" \
        -v aip-pgs-data:/var/lib/postgresql/$OLD/data \
        -v aip-pg12-data:/var/lib/postgresql/$NEW/data \
        "tianon/postgres-upgrade:$OLD-to-$NEW"

LOGS:---- 
Performing Consistency Checks
-----------------------------
Checking cluster versions                                   ok

connection to database failed: FATAL:  role "postgres" does not exist

could not connect to source postmaster started with the command:
"/usr/lib/postgresql/11/bin/pg_ctl" -w -l "pg_upgrade_server.log" -D "/var/lib/postgresql/11/data" -o "-p 50432 -b  -c listen_addresses='' -c unix_socket_permissions=0700 -c unix_socket_directories='/var/lib/postgresql'" start
Failure, exiting

I tried this workaround https://github.com/tianon/docker-postgres-upgrade/issues/10#issuecomment-523020113 , but still getting the same error. Any idea why this is happening? OR is that open bug.?

micemuni commented 5 years ago

@tianon any update on above error.?

tianon commented 5 years ago

This is an open bug; you're running into #10 exactly (so this is a duplicate of #10).