If you get the above error, please follow the below steps.

Above error states that postgres is not running.

  1. Running pg_lsclusters will list all the postgres clusters running on your device.

2. Most probably the status will be down if we get the above error . Try restarting Postgres clusters and service
systemctl start postgresql@12-main

3. Check ownership of postgres. Make sure that postgres is the owner of /var/lib/postgresql/version_no/main
eg: sudo chown postgres -R /var/lib/postgresql/12/main/

The issue will be resolved with the above steps. If the issue still persists then we need to debug further.

Leave a Reply

This website stores cookies on your computer. These cookies are used to provide a more personalized experience and to track your whereabouts around our website in compliance with the European General Data Protection Regulation. If you decide to to opt-out of any future tracking, a cookie will be setup in your browser to remember this choice for one year.

Accept or Deny