Unable to modify psql_host

I am trying to migrate my group’s Gitlab server (Community 8.11.2) to company data center. The data center has policy of all app data must be in /appslvm partition. I replaced “/var/opt” with “/appslvm/opt” in the following files: /opt/gitlab/etc/gitlab-psql-rc

So psql_host became “/appslvm/opt/gitlab/postgresql” in /opt/gitlab/etc/gitlab-psql-rc. But after I ran “gitlab-ctl reconfigure”, /opt/gitlab/etc/gitlab-psql-rc got restored. As a result psql_host still point to /var/opt/gitlab/postgresql.

Could anyone tell me what is the correct way to modify psql_host?

Here is the “gitlab-ctl reconfigure” error output:

  • execute[/opt/gitlab/bin/gitlab-ctl start postgresql] action run
    [execute] ok: run: postgresql: (pid 19706) 0s
    • execute /opt/gitlab/bin/gitlab-ctl start postgresql
  • template[/opt/gitlab/etc/gitlab-psql-rc] action create
    • update content in file /opt/gitlab/etc/gitlab-psql-rc from 72be84 to eaeb56
      — /opt/gitlab/etc/gitlab-psql-rc 2017-12-14 03:37:05.052796818 +0100
      +++ /opt/gitlab/etc/.chef-gitlab-psql-rc20171214-19131-13twa3i 2017-12-14 03:51:39.950281119 +0100
      @@ -1,4 +1,4 @@
  • execute[create gitlab database user] action run
    [execute] psql: could not connect to server: No such file or directory
    Is the server running locally and accepting
    connections on Unix domain socket “/var/opt/gitlab/postgresql/.s.PGSQL.5432”?