title: Travis CI not connecting to PostgreSQL 11.2
body: <p>I'm having trouble with a build of a Rails application for a PostgreSQL 11.2 database.</p>
  
  <p>Here's the <code>.travis.yml</code> file:</p>
  
  <pre><code>rvm:
    - 2.6.1
  dist: xenial
  services:
    - postgresql
  addons:
    postgresql: "11.2"
    apt:
      packages:
        - postgresql-11
  before_script:
    - psql --version
    - psql -c 'create database kpdotcom_test;' -U postgres
    - cp config/database.yml.travis config/database.yml
    - bundle exec rake db:schema:load
  </code></pre>
  
  <p>However, the build fails:</p>
  
  <p><a href="https://i.stack.imgur.com/PaZd6.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/PaZd6.jpg" alt="enter image description here"></a></p>
  
  <p>Any suggestions would be gratefully appreciated.</p>