Raise error: "release called twice for the same resource: Error" #33

senotrusov opened this Issue Mar 22, 2012 · 2 comments

3 participants


Currently if release is called twice for the same resource the only way to know it is to enable logging and watch for it.

That error "handling" logic may leads to issues like that: https://github.com/brianc/node-postgres/issues/11111

I suggest to somehow raise that error by using exceptions or another node error emitting technique.


Hi there. The link you provided 404s now. Can you tell me more about the problem you're having?

The current release() behavior is idempotent. Throwing an exception would change those semantics.

Would it help if release() returned a boolean that indicated whether the obj was returned to the pool?


Going to close this and add a reference to #65 where something similar is being talked about and a fix should eventually happen.

@sandfox sandfox closed this Jun 20, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment