Before anything, please note that I have found several similar questions on Stack Overflow and articles all over the web, but none of those helped me fix my issue:
The postgresql server might be down and the solution might be as simple as running:
sudo service postgresql start
which fixed the issue for me.