fe_sendauth: no password supplied

After making changes to the pg_hba.conf or postgresql.conf files, the cluster needs to be reloaded to pick up the changes. From the command line: pg_ctl reload From within a db (as superuser): select pg_reload_conf(); From PGAdmin: right-click db name, select “Reload Configuration” Note: the reload is not sufficient for changes like enabling archiving, changing shared_buffers, etc — those require a cluster restart.

PSQLException: current transaction is aborted, commands ignored until end of transaction block

I got this error using Java and PostgreSQL doing an insert on a table. I will illustrate how you can reproduce this error: Summary: The reason you get this error is because you have entered a transaction and one of your SQL Queries failed, and you gobbled up that failure and ignored it. But that … Read more

“use database_name” command in PostgreSQL

When you get a connection to PostgreSQL it is always to a particular database. To access a different database, you must get a new connection. Using \c in psql closes the old connection and acquires a new one, using the specified database and/or credentials. You get a whole new back-end process and everything.

Getting error: Peer authentication failed for user “postgres”, when trying to get pgsql working with rails

The problem is still your pg_hba.conf file*. This line: Should be: * The location of this file isn’t very consistent. The command locate pg_hba.conf should help; here’s some examples: /etc/postgresql/*/main/pg_hba.conf and /var/lib/pgsql/data/pg_hba.conf. After altering this file, don’t forget to restart your PostgreSQL server. If you’re on Linux, that would be sudo service postgresql restart. These are brief descriptions of both options according to … Read more

Psql could not connect to server: No such file or directory, 5432 error?

I’ve had this same issue, related to the configuration of my pg_hba.conf file (located in /etc/postgresql/9.6/main). Please note that 9.6 is the postgresql version I am using. The error itself is related to a misconfiguration of postgresql, which causes the server to crash before it starts. I would suggest following these instructions: Certify that postgresql service … Read more