PostgresSQL authentication error I recently forgot my PostgreSQL 9.1 password on my windows 8 and it asks for password on pgAdmin III console.

Can I retrieve the password or reset it?
After researching, I found that we need to find the pg_hba.conf file under

C:\Program Files\PostgreSQL\9.3\data



Run the notepad++ as administrator (or the editor you usually use to edit the files)
Open the file and at the very bottom, look for

# TYPE  DATABASE        USER            ADDRESS                 METHOD


For all the entries for TYPE host, change the METHOD from md5 to trust. Save the file. (Make sure there are no interactions with the database at this moment.)
Press Windows+R to get the run dialog, type services.msc and press enter.
Once you see the services(Local) window, choose a service named 
"postgresql-x64-9.3 - PostgreSQL Server 9.3" and on the left hand side, restart the service.
Now go back to the pgAdminIII and run the server using default password.
Once you could connect to the server, flip back the settings on the pb_hba.cfg file and save it. Remember before quitting pgAdminIII, do not forget to change the password.


Choose File->Change password to change the password (old password would be a default of postgres).