I've got a client which has a PostgreSQL database and that he cannot recall the password that people used once the database was setup. It is possible to method to recover that information and so i don't have to blow away his database and begin on your own?

The database is running on the PC.

Step One: Edit PostgreSQL config file to determine trust relationship to login without password:

mire /var/lib/pgsql/data/pg_hba.conf

Old Line:

local all postgres password

Change it out to:

local all postgres trust

Step Two: Restart PostgreSQL Server:

service postgresql restart

Step Three: Change password:

psql -U postgres template1 -c alter user postgres with password ‘newpassword’

Step Four: Password continues to be up-to-date. Revert back the initial configurations of config file:

mire /var/lib/pgsql/data/pg_hba.conf

Old Line:

local all postgres trust

Change it out to:

local all postgres password

Step Five: Restart server and employ your brand-new password to gain access to PostgreSQL Server.

service postgresql restart

Source