Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • 1
    While I've accepted cravori's answer by precendence, you give the same solution with a more detailed explanation. Thanks for that.
    – ChrisGuest
    Commented Oct 18, 2012 at 22:35
  • @ChrisGuest Understood. The timeout variable is new information to me also, and it wasn't immediately apparent to me what needed to be done to take advantage of it. Hopefully this will help those who run across it and are dense like me :-)
    – Bryan
    Commented Oct 18, 2012 at 23:24
  • @Bryan timeout is in connection object level , means after connection object populated , is it possible to pass any timeout while trying to connect , i mean login timeout , as postgres we can pass such timeout as : psycopg2.connect(user = data['username'], password = data['password'], host = postgres_host, port = postgres_port, database = postgres_db, connect_timeout=connect_timeout)
    – Asraful
    Commented Apr 14, 2020 at 16:56