Restoring PostgreSQL database gitlabhq_production ... ERROR: must be owner of extension pg_trgm
ERROR: must be owner of extension btree_gist
ERROR: must be owner of extension btree_gist
ERROR: must be owner of extension pg_trgm
- 修改postgresql相关配置
修改端口监听地址,默认监控localhost,* 代表all
vi /var/opt/gitlab/postgresql/data/postgresql.conflisten_addresses = '*'
最底下添加两行
vi /var/opt/gitlab/postgresql/data/pg_hba.conf
local all all trust
host all all 127.0.0.1/32 trust
- 重启gitlab服务
gitlab-ctl restart
- 修改gitlab账号为超级用户
su - gitlab-psql
$ /opt/gitlab/embedded/bin/psql -h 127.0.0.1 gitlabhq_production
gitlabhq_production=# ALTER USER gitlab WITH SUPERUSER;
gitlabhq_production=# ALTER ROLE
gitlabhq_production=# \q
$ exit
- 重新执行恢复语句后,正常。