Recover PostgreSQL password with admin access to host
This is easy to fix. Edit pg_hba.conf to add a line like this:

host all postgres 127.0.0.1/32 trust


(You may need to restart Postgres server after editing it).

Then, use this:

psql -d postgres -U postgres


You should be able to get admin access without password now (that's why you added trust rule to pg_hba.conf).

Once this command works, change your password:

ALTER ROLE postgres PASSWORD 'newpassword';


After doing this, edit pg_hba.conf to remove line you added.