Postgres - pg_upgrade 11 到 12 角色 "postgres" 不存在
Postgres - pg_upgrade 11 to 12 role "postgres" does not exist
尝试使用 https://github.com/tianon/docker-postgres-upgrade 从 11 升级到 12 时 - 弹出以下错误:
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"
日志:----
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
知道为什么会这样吗?或者是那个开放的错误。?修复方法是什么?
是的,一旦我通过 POSTGRES_USER 作为 env,它就可以正常工作了。谢谢
尝试使用 https://github.com/tianon/docker-postgres-upgrade 从 11 升级到 12 时 - 弹出以下错误:
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"
日志:----
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
知道为什么会这样吗?或者是那个开放的错误。?修复方法是什么?
是的,一旦我通过 POSTGRES_USER 作为 env,它就可以正常工作了。谢谢