Gitlab升级,将 PostgreSQL 从 9.6.17升级至11.7失败

在将 Gitlab 从12.10.14升级13.0.14时,使用命令 gitlab-ctl pg-upgrade -V 11 打算将 postgresql 从 9 升级至 11,但失败。日志如下:

[root@localhost ~]# gitlab-ctl pg-upgrade -V 11
Checking for an omnibus managed postgresql: OK
Checking if postgresql['version'] is set: OK
Checking if we already upgraded: NOT OK
Checking for a newer version of PostgreSQL to install
Upgrading PostgreSQL to 11.7
Checking if PostgreSQL bin files are symlinked to the expected location: OK
Waiting 30 seconds to ensure tasks complete before PostgreSQL upgrade.
See https://docs.gitlab.com/omnibus/settings/database.html#upgrade-packaged-postgresql-server for details
If you do not want to upgrade the PostgreSQL server at this time, enter Ctrl-C and see the documentation for details

Please hit Ctrl-C now if you want to cancel the operation.
Toggling deploy page:cp /opt/gitlab/embedded/service/gitlab-rails/public/deploy.html /opt/gitlab/embedded/service/gitlab-rails/public/index.html
Toggling deploy page: OK
Toggling services:ok: down: alertmanager: 0s, normally up
ok: down: gitaly: 1s, normally up
ok: down: gitlab-exporter: 0s, normally up
ok: down: grafana: 1s, normally up
ok: down: logrotate: 0s, normally up
ok: down: node-exporter: 0s, normally up
ok: down: postgres-exporter: 1s, normally up
ok: down: prometheus: 0s, normally up
ok: down: redis-exporter: 1s, normally up
ok: down: sidekiq: 1s, normally up
Toggling services: OK
Running stop on postgresql:ok: down: postgresql: 0s, normally up
Running stop on postgresql: OK
Symlink correct version of binaries: OK
Creating temporary data directory: OK
Initializing the new database:Error initializing database for 11.7
STDOUT: The files belonging to this database system will be owned by user "gitlab-psql".
This user must also own the server process.

STDERR: /etc/profile.d/lang.sh:行29: 警告:setlocale: LC_TIME: 无法改变区域选项 (zh_CN.UTF-8)
initdb: invalid locale name "en_US.UTF-8"
== Fatal error ==
Please check the output and try again
== Reverting ==
ok: down: postgresql: 1s, normally up
Symlink correct version of binaries: OK
ok: run: postgresql: (pid 19645) 1s
== Reverted ==
== Reverted to 9.6.17. Please check output for what went wrong ==
Toggling deploy page:rm -f /opt/gitlab/embedded/service/gitlab-rails/public/index.html
Toggling deploy page: OK
Toggling services:ok: run: alertmanager: (pid 19657) 0s
ok: run: gitaly: (pid 19671) 1s
ok: run: gitlab-exporter: (pid 19694) 0s
ok: run: grafana: (pid 19711) 1s
ok: run: logrotate: (pid 19723) 0s
ok: run: node-exporter: (pid 19733) 0s
ok: run: postgres-exporter: (pid 19815) 1s
ok: run: prometheus: (pid 19825) 0s
ok: run: redis-exporter: (pid 19839) 1s
ok: run: sidekiq: (pid 19848) 0s
Toggling services: OK

该如何处理?