Reset postgres password v9.1 I'm trying to reset my lost password for Postgres v9.1 (windows 7) like written at https://wiki.postgresql.org/wiki/FAQ#I_lost_the_database_password._What_can_I_do_to_recover_it.3F  :
1. edit pg_hba.conf to allow trust authorization temporarily

In pg_hba.conf I've put :

local all all trust
host all all 127.0.0.1/32 trust

2. Reload the config file (pg_ctl reload)

Done. I have also restarted the Postgres service (via services.msc)
3. Connect and issue ALTER ROLE / PASSWORD to set the new password

Then I execute 'psql.exe' but it asks me for a password !
Why ?
Thanks for your help.
Try to run psql -h 127.0.0.1 (...) 

When you use the -h that will tell psql to use a TCP/IP connection
('h' is from host), and the parameter after -h is the name of the host.

In that case 127.0.0.1 is a default address, meaning localhost.

If you don't use the -h (with host next to this parameters) it will
use a "local way" of connection called unix domain sockets.