Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

pool.end() resolves before the last pool.query() #3461

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
brianc merged 7 commits into master from push-mpvwkrquvyqr
May 29, 2025
Merged

Conversation

Copy link
Collaborator

@hjr3 hjr3 commented May 10, 2025
edited
Loading

dupe of #3254 with 289273c to fix the failing test

Copy link

cloudflare-workers-and-pages bot commented May 10, 2025
edited
Loading

Deploying node-postgres with Cloudflare Pages Cloudflare Pages

Latest commit: 289273c
Status: ✅ Deploy successful!

View logs

Copy link
Collaborator Author

hjr3 commented May 11, 2025

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

Copy link
Owner

brianc commented May 12, 2025

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!

Copy link
Collaborator Author

hjr3 commented May 12, 2025
edited
Loading

I agree this is a fix. No one expects pool.end to resolve before the last pool.query. Also, the documentation did not state that remove event is emitted prior to client end finishing.

edit:
Docs for remove event:

Whenever a client is closed & removed from the pool the pool will emit the remove event.

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.

@hjr3 hjr3 self-assigned this May 23, 2025
@brianc brianc merged commit 411869d into master May 29, 2025
13 checks passed
@brianc brianc deleted the push-mpvwkrquvyqr branch May 29, 2025 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@brianc brianc Awaiting requested review from brianc

Assignees

@hjr3 hjr3

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /