BUG: Infinite loop on failed connect to a postgresql server

When a postgres db server is down or credentials are wrone, the adapter still tries to check for a existing database and loops back into trying to connect again.
Merge pull request #12 from stojg/bug-infinite-loop-on-failed-connect

BUG: Infinite loop on failed connect to a postgresql server