Error: invalid authorization specification

@michalmuskala and @OvermindDL1: thanks, how to change it to listen on port? I saw port configuration in postgresql.conf, but uncommenting it not and restarting not works.

psql -h localhost -U postgres
psql: FATAL: Ident authentication failed for user “postgres”

Looks like unix sockets are turn on by default with localhost configuration, but this is required by ecto:
https://github.com/elixir-ecto/ecto/issues/1207#issuecomment-172570064

Note: this configuration now works:

local   all             all                                     md5  
 # IPv4 local connections:
host    all             all             127.0.0.1/32            md5
 # IPv6 local connections:
host    all             all             ::1/128                 ident

but is md5 safe?