title: Restart postgres server writes fatal error password authentication for user postgres in logfile
body: <p>When i restart the postgresql server with <code>sudo service postgresql restart</code> everything works as expected. </p>
  
  <p>But the logfile <code>/var/log/postgresql/postgresql-9.3-main.log</code> shows that a fatal error happened.</p>
  
  <pre><code>2016-12-09 11:50:26 CET LOG:  MultiXact member wraparound protections are now enabled
  2016-12-09 11:50:26 CET LOG:  autovacuum launcher started
  2016-12-09 11:50:26 CET LOG:  database system is ready to accept connections 
  2016-12-09 11:50:26 CET FATAL:  password authentication failed for user "postgres"
  2016-12-09 11:50:26 CET DETAIL:  Connection matched pg_hba.conf line xx: "local   all             postgres                                md5"
  2016-12-09 11:50:27 CET FATAL:  password authentication failed for user "postgres"
  </code></pre>
  
  <p>I did setup the postgres superuser <code>postgres</code> with a  secure password.
  I am able to login with</p>
  
  <pre><code>psql -U postgres
  </code></pre>
  
  <p>But the UNIX user postgres is also setup with a login shell and a password. So i locked this user by setting  <code>/usr/sbin/nologin</code> in <code>/etc/passwd</code>.
  I am not able to su into the UNIX postgres user anymore but with </p>
  
  <pre><code>sudo -u postgres psql postgres
  </code></pre>
  
  <p>it is possible to log into the database. </p>
  
  <p>Restarting the server still shows  the same error message.</p>
  
  <p>In <code>pg_hba.conf</code> the method for <code>postgres</code> and <code>all</code> is set to <code>md5</code>.</p>
  
  <p>I dont really understand what the server is complaining about, because the connection can be established and i am able to login.</p>
  
  <p>Many thanks in advance!</p>