when i create a new user, but it cannot login the database.
I do that like this:
postgres@Aspire:/home/XXX$ createuser dev
Shall the new role be a superu
Try:
psql -U user_name -h 127.0.0.1 -d db_name
where
-U is the database user name-h is the hostname/IP of the local server, thus avoiding Unix domain sockets-d is the database name to connect toThis is then evaluated as a "network" connection by Postgresql rather than a Unix domain socket connection, thus not evaluated as a "local" connect as you might see in pg_hba.conf:
local all all peer