고유 제약 조건을 위반하는 중복 키 값 오류로 업그레이드 실패

음, postgresql 서비스를 시작하는 데 성공했고, 데이터베이스 백업을 수행한 후 데이터베이스에 접속했습니다:

# chown -R postgres /shared/postgres_data
# service postgresql start
 * Starting PostgreSQL 10 database server                                                                                        [ OK ] 
# psql
psql: FATAL:  role "root" does not exist
# su - discourse
$ pg_dump -xOf ~/discourse-backup.sql -d discourse -n public
$ exit
# mv /home/discourse/discourse-backup.sql /shared/discourse-backup-20200227-1.sql
# su - postgres
$ psql discourse
psql (10.4 (Ubuntu 10.4-2.pgdg16.04+1))
Type "help" for help.

discourse=#

이제 제 설치를 복구하려면 어떻게 해야 할까요?