title: PostgreSQL: MD5 Authentication in pg_hba.conf gives me FATAL: Peer authentication failed for user "postgres"
body: <p>I'm running Ubuntu 14.04 and installed PostgreSQL 9.3.
  Edited <em>/etc/postgresql/9.3/main/pg_hba.conf</em> as:</p>
  
  <pre><code># "local" is for Unix domain socket connections only
  local   all             all                                     md5
  # IPv4 local connections:
  host    all             all             127.0.0.1/32            md5
  # IPv6 local connections:
  host    all             all             ::1/128                 md5
  </code></pre>
  
  <p>I restarted the server and now I'd like to login into postgres as <strong>postgres</strong>:</p>
  
  <pre><code>victor@workstation:~$ psql -U postgres
  psql: FATAL:  Peer authentication failed for user "postgres"
  </code></pre>
  
  <p>Shouldn't postgres prompt for my password, as I've set its authentication method to <strong>MD5</strong> ?</p>
  
  <p>I understand that if I add <strong>-h localhost</strong> it will work.</p>
  
  <p>Does not adding this flag causes psql to use peer-authentication?</p>