Postgresql service errors and Metasploit database (msfdb)

Briefly describe your issue below:

Okay so let me start from the beginning. I wanted to use the wmap tool available with msfconsole, so i loaded up msfconsole and typed in load wmap. The following error was thrown -
[-] Failed to load plugin from /usr/share/metasploit-framework/plugins/wmap: Database not connected (try db_connect)

I investigated further. Checked the db_status which returned:
[*] postgresql selected, no connection

Exited msfconsole and typed in sudo msfdb status. Returned:
[i] No network service running
[+] Detected configuration file (/usr/share/metasploit-framework/config/database.yml)

sudo service postgresql restart and then sudo msfdb reinit threw the following errors:
psql: error: could not connect to server: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket “/var/run/postgresql/.s.PGSQL.5432”?
PG::ConnectionBad: could not connect to server: Connection refused
Is the server running on host “localhost” (::1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused
Is the server running on host “localhost” (127.0.0.1) and accepting
TCP/IP connections on port 5432?

All of this led me to conclude that postgresql was not getting setup to listen on 127.0.0.1:5432. An nmap 127.0.0.1 confirmed this further.

I have been trying to debug this issue for a week now any directions to resolve it would be much much much appreciated!

What version of Parrot are you running? (include version (e.g. 4.6), edition(e.g. Home//KDE/OVA, etc.), and architecture (currently we only support amd64)
I am using Parrot Sec 4.9 , KDE plasma version 5.17.5 on amd64

What method did you use to install Parrot? (Debian Standard / Debian GTK / parrot-experimental)
do not remember, if this is important let me know.
Configured to multiboot with other systems? (yes / no)
yes