Recovering from a lost PostgreSQL password.

Let's say you're in situation when you have to connect to PostgreSQL, but you have no idea on what password might be set. But some definitely is, as you get this error message:

=> psql
Password:
psql: FATAL:  password authentication failed for user "depesz"

Continue reading Recovering from a lost PostgreSQL password.