title: Permission denied with Heroku pg:pull to my local database
body: <p>I have a live app running with a database on Heroku but the database needs an update so my plan is to pull the database, update it, test it on my development server, then push it to production. With the first step I am struggling with pulling the heroku db to overwrite my local db. I am using the following command:</p>
  
  <pre><code>PGUSER=userforlocaldb PGPASSWORD=passwordforlocaldb heroku pg:pull HEROKU_POSTGRESQL_herokudbcolor localdbname --app herokuappname
  </code></pre>
  
  <p>I get this error message:</p>
  
  <pre><code> !    createdb: database creation failed: ERROR:  permission denied to create database
   !    
   !    Unable to create new local database. Ensure your local Postgres is working and try again.
  </code></pre>
  
  <p>I have also tried filling the PGUSER and PGPASSWORD values with my heroku db but that did not work. </p>
  
  <p>What am I missing here?</p>
  
  <p>EDIT: I changed the password for superuser postgres and re-ran the command. I get this error: Peer authentication failed for user "postgres"</p>