hey ! @Prabhleen
i faced the same problem before .
you can follow these steps to solve that .
- find the PID of application running on 127.0.0.1 and port 5432
- kill the process with known PID
3.and restart the server of postresql .
commands to use on ubuntu , according to steps mentioned above;
- netstat -tnlp
it will list all programme and respective PID , just find the PID manually . - kill “PID”
- sudo systemctl restart postgresql
if you don't find any PID , just do step 3
let me know if you got over this or not !!