The best solution to this problem is to edit /etc/postgresql/9.1/main/postgresql.conf BEFORE you start the postgresql and metasploit services to change the port from 5433 to 5432
If when you...