Troubleshooting a failed connection
This recipe is all about what you should do when things go wrong.
Bear in mind that 90% of problems are just misunderstandings, and you'll quickly be on track again.
How to do it…
Here, we've made a checklist to be followed if a connection attempt fails:
- Check whether the database name and the username are accurate. You may be requesting a service on one system when the database you require is on another system. Recheck your credentials; ensure that you haven't mixed things up and that you are not using the database name as the username, or vice versa. If you receive an error for too many connections, then you may need to disconnect another session before you can connect or request the administrator to allow further connections.
- Check for explicit rejections. If you receive theÂ
pg_hba.conf rejects connection for host...
 error message, it means that your connection attempt has been explicitly...