The OID of the superuser in PostgreSQL is important when doing PostgreSQL upgrades
pg_upgrade will generate the error
Checking database user is the install user database user "gitlab-psql" is not the install user if the account that's passed does not have
OID=10 in the roles table.
Note: this error occurs on Omnibus installations.
Stack overflow posts by Lawrenz, who did the recent Postgres training, have the answer.
I would suspect that
postgresql['username'] = "gitlab-psql" in gitlab.rb is what is passed to
pg_upgrade and that in turn needs to have OID 10.
gitlabhq_production=# \x Expanded display is on. gitlabhq_production=# select * from pg_roles where oid=10; -[ RECORD 1 ]--+------------ rolname | gitlab-psql rolsuper | t rolinherit | t rolcreaterole | t rolcreatedb | t rolcanlogin | t rolreplication | t rolconnlimit | -1 rolpassword | ******** rolvaliduntil | rolbypassrls | t rolconfig | oid | 10
So, one fix is to tell Omnibus to use a different account.
Another may be to rename the role with oid 10 to
Agent: Ben Prescott