MySQL --> PostgreSQL 10.2.8ee

Ahoy!

I have a mysql gitlab instance that I’m trying to convert to a postgresql instance using this guide: Migrating from MySQL to PostgreSQL | GitLab

In the part where I reconfigure gitlab I get this output:

Recipe: gitlab::database_migrations
  * bash[migrate gitlab-rails database] action run
    [execute] rake aborted!
              ActiveRecord::NoDatabaseError: FATAL:  role "git" does not exist
              /opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/db.rake:49:in `block (3 levels) in <top (required)>'
              /opt/gitlab/embedded/bin/bundle:23:in `load'
              /opt/gitlab/embedded/bin/bundle:23:in `<main>'
              PG::ConnectionBad: FATAL:  role "git" does not exist
              /opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/db.rake:49:in `block (3 levels) in <top (required)>'
              /opt/gitlab/embedded/bin/bundle:23:in `load'
              /opt/gitlab/embedded/bin/bundle:23:in `<main>'
              Tasks: TOP => gitlab:db:configure
              (See full trace by running task with --trace)
    ================================================================================
    Error executing action `run` on resource 'bash[migrate gitlab-rails database]'
    ================================================================================

Could it be that the configuration instructions in the article are incompatible with the version I’m running (10.2.8ee) and I’ve missed something?

What I did:

  1. sudo gitlab-ctl stop
  2. edit /etc/gitlab/gitlab.rb: postgresql['enable'] = true
  3. comment out settings belonging with db_ in order to use defaults
  4. reconfigure