Bootstrap

GitLab|GitLab报错:Restoring PostgreSQL database gitlabhq_production...

错误信息:

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

解决方案:

  1. 修改postgresql相关配置

修改配置文件postgresql.conf,修改端口监听地址,默认监控localhost,* 代表all

$ vim /var/opt/gitlab/postgresql/data/postgresql.conf
listen_addresses = '*'

修改配置文件pg_hba.conf,新增以下两行

$ vim /var/opt/gitlab/postgresql/data/pg_hba.conf
local all all trust
host all all 127.0.0.1/32 trust
  1. 重启gitlab服务

gitlab-ctl restart
  1. 修改数据

$ su - gitlab-psql
$ /opt/gitlab/embedded/bin/psql -h 127.0.0.1 gitlabhq_production
gitlabhq_production=# ALTER USER gitlab WITH SUPERUSER;
ALTER ROLE
gitlabhq_production=# \q
$ exit

作者:Kkoo

链接:https://www.pwwwp.com/

著作权归作者所有。商业转载请联系作者进行授权,非商业转载请注明出处。

;