{"action":"opened","issue":{"url":"https://api.github.com/repos/brianc/node-postgres/issues/805","labels_url":"https://api.github.com/repos/brianc/node-postgres/issues/805/labels{/name}","comments_url":"https://api.github.com/repos/brianc/node-postgres/issues/805/comments","events_url":"https://api.github.com/repos/brianc/node-postgres/issues/805/events","html_url":"https://github.com/brianc/node-postgres/issues/805","id":89088905,"number":805,"title":"Set a timeout on pg.connect","user":{"login":"kevinburkeshyp","id":10735057,"avatar_url":"https://avatars.githubusercontent.com/u/10735057?v=3","gravatar_id":"","url":"https://api.github.com/users/kevinburkeshyp","html_url":"https://github.com/kevinburkeshyp","followers_url":"https://api.github.com/users/kevinburkeshyp/followers","following_url":"https://api.github.com/users/kevinburkeshyp/following{/other_user}","gists_url":"https://api.github.com/users/kevinburkeshyp/gists{/gist_id}","starred_url":"https://api.github.com/users/kevinburkeshyp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevinburkeshyp/subscriptions","organizations_url":"https://api.github.com/users/kevinburkeshyp/orgs","repos_url":"https://api.github.com/users/kevinburkeshyp/repos","events_url":"https://api.github.com/users/kevinburkeshyp/events{/privacy}","received_events_url":"https://api.github.com/users/kevinburkeshyp/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-17T18:20:20Z","updated_at":"2015-06-17T18:20:20Z","closed_at":null,"body":"Hi Brian,\r\nThanks for this library, it's great.\r\n\r\nCurrently if I call `pg.connect` but my pool is full, node-postgres will block until a connection becomes available. Is there a way to set a timeout on a connection attempt? I would rather not block indefinitely if the pool is full. \r\n\r\nSomething like `pg.connect({timeout: 500}, function(err) { console.log(err); }`\r\n\r\nI can wrap it in a `setTimeout`, but do I need to do cleanup/is there a way to cancel a connection attempt?"}}