This is a fix on a problem with Metasploit connecting to PostgreSQL database when setting up the database in Kali on a Raspberry Pi as shown in the free ethical hacking course Metasploit Finally Unleashed by Offensive Security.

source