Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Your <code>pg_hba.conf</code> should indeed require a password for unix socket connections, but there are still ways around it that you should verify:</p> <ol> <li><p>a <code>.pgpass</code> file in the postgres home directory containing the password (also check the <a href="http://www.postgresql.org/docs/9.1/static/libpq-pgpass.html" rel="noreferrer">PGPASSFILE</a> environment variable for a non-standard path).</p></li> <li><p>the <a href="http://www.postgresql.org/docs/9.1/static/libpq-envars.html" rel="noreferrer">PGPASSWORD</a> environment variable could be set.</p></li> </ol> <p>And there's also the possibility that you're editing the wrong pg_hba.conf file. When connected as postgres, the correct path can be obtained for verification with the <code>SHOW hba_file</code> SQL command.</p> <p>Also, you may want to check the log file, <code>/var/log/postgresql/postgresql-9.1-main.log</code> for confirmation that the configuration files are reloaded when you ask for it, and look for any suspect message during the authentication.</p> <p>As for the reason why passwordless connections with the postgres user are common, the debian PG-9.1 <code>pg_hba.conf</code> has this comment about disallowing them:</p> <pre><code># DO NOT DISABLE! # If you change this first entry you will need to make sure that the # database superuser can access the database using some other method. # Noninteractive access to all databases is required during automatic # maintenance (custom daily cronjobs, replication, and similar tasks). # # Database administrative login by Unix domain socket local all postgres peer </code></pre> <p>Since Debian and Ubuntu use the same postgres packages, this applies to Ubuntu as well.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload