Honor database password
Zendesk issue: https://gitlab.zendesk.com/agent/tickets/28415
In an HA setup, when Omnibus is used to provide the PostgreSQL database, or when a user configures PG to require a password, the PostgreSQL recipe fails because it doesn't supply a password. An example of this is with the pg_trgm
extension execute statement:
- execute /opt/gitlab/embedded/bin/psql --port 5432 -h /var/opt/gitlab/postgresql -d gitlabhq_production -c "CREATE EXTENSION IF NOT EXISTS pg_trgm;"
Recipe: gitlab::database_migrations
* bash[migrate gitlab-rails database] action run
[execute] rake aborted!
PG::ConnectionBad: fe_sendauth: no password supplied
If a password is provided, all PG commands should use it to connect to the database.