How to reset postgres user password in windows ?

Now I am going to show you something amazing solution for this problem.

Guys, Can you believe that PostgreSQL store it’s postgres super user password into plain text.

Wow, If it is in plain text then its very easy to change.

I have found that there are many ways to reset postgres super user password like, editing pg_hba.conf file but this change is require to restart postgres service. I have found this kind of solution on internet from different source.

But, I am wondering something about the new solution.

This amazing solution for the windows postgres user is , to change content of pgpass.conf file.

How ?

I read document of PostgreSQL organization and found postgres storing all passwords as a plain text into pgpass.conf.

Now time to search this file in our windows storage directory.

I found this file in : 

C:\Document and  Settings\..\Application Data\postgresql\pgpass.conf

  • You can find your postgres super user password in this file.
  • If you find blank file then please write your new password in this file and this password will work for postgres super user

Please note, this password is only for client side location after reset this you can connect your pgadmin tool.

Anvesh Patel

Leave a Reply

Be the First to Comment!

Notify of
avatar
wpDiscuz