pool.end() resolves before the last pool.query()#3461
Conversation
Because when you don't pass a callback to .end() it always returns a promise
Deploying node-postgres with
|
| Latest commit: |
289273c
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://6a8ab911.node-postgres.pages.dev |
| Branch Preview URL: | https://push-mpvwkrquvyqr.node-postgres.pages.dev |
|
note: if we want to merge this, then i should update the docs for https://node-postgres.com/apis/pool#remove to document the change in behavior |
Would you consider this a bug-fix or a breaking change? Seems to me like its a semantic alignment w/ expectations and more of a fix than a break, and no exising tests required changing so its more of a patch than a semver major. But I'd love to hear your thoughts! |
|
I agree this is a fix. No one expects edit:
So, I would say that the expectation is that the client has been closed. Even more strongly in the "fix" camp. Maybe no change in behavior needs to be documented either. |
dupe of #3254 with 289273c to fix the failing test