pg_restore error: role XXX does not exist
问题 Trying to replicate a database from one system to another. The versions involved are 9.5.0 (source) and 9.5.2 (target). Source db name is foodb with owner pgdba and target db name will be named foodb_dev with owner pgdev . All commands are run on the target system that will host the replica. The pg_dump command is: pg_dump -f schema_backup.dump --no-owner -Fc -U pgdba -h $PROD_DB_HOSTNAME -p $PROD_DB_PORT -d foodb -s --clean; This runs without errors. The corresponding pg_restore is: pg