Postgresql fails

Sorry if this is covered. I am new to gitlab and have googled for the past couple of days and have found nothing that works or that I understand. I have taken on a machine that already has gitlab on it. When visiting the url I get the 502 error gitlab is taking too long to respond.

When I run gitlab-ctl reconfigure it fails migrating database and says connection bad could not connect to server.

When I run gitlab-ctl tail postgresql it repeatedly says:
unrecognized configuration parameter “unix_socket_directory” in file "/var/opt/gitlab/postgresql/data/postgresql.conf: line 72
unrecognized configuration parameter “chekckpoint_segments” in file “/var/opt/gitlab/postgresql/data/runtime.conf” line 14
configuration file "/var/opt/gitlab/postgresql/data/runtime.conf: contains errors
skipping missing configuration file “/var/opt/gitlab/postgresql/data/postgresql.auto.conf”

version-manifest.txt says that gitlab-ctl is version 10.6.3 and postgresql is at version 9.6.8. I am pretty sure it had the omnibus postgresql but I wasn’t thinking and installed postgresql using yum.

Thank you for any help you can give me.

@techmoto any update on this? I´m facing the same issue