thiemo <thiemo(at)gmx(dot)ch> writes:
> unfortunately I have forgotten the mpassword of the master user of a db.
> Is there a way to retrieve it using the user who owns the db template1?
No, but you can temporarily set the authorization policy (pg_hba.conf)
to something other than password; log in as the superuser without any
password; assign yourself a new password.
regards, tom lane