Repository navigation
Conversation
…ter a cached plan error A cancelled query that hit a cached-plan error was sent to retry(), and submit() drops cancelled queries without settling them, so the promise hung. A cancelled query now ends with the server's error.
This was referenced Oct 16, 2026
… and the server error as cause The cancelled query is not retried; it now ends like every other cancel path, and the cached plan error stays reachable as cause. The README example called pg_sleep without parentheses and now says what a cancelled query rejects with.
Reverts the 57014 rejection for a cancelled retried query while that choice is reconsidered; the query ends with the server error again.
…ndled rejection Query.cancel() attaches a no-op rejection handler to the query's own promise, through Promise.prototype.then so a query that has not been executed is not started. Code that awaits the query still receives the error. The cancelled cached-plan case keeps the server's error, and the README now says what a cancelled query rejects with.
This was referenced Oct 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #123
Closes #130
A cancelled pipelined prepared statement that hit a cached plan error was sent to retry(), which dropped it without settling, so the promise hung. It is no longer retried and rejects with the server's error.
Query.cancel() now marks the query's own rejection as handled, so cancelling a query you do not await no longer raises an unhandled rejection; awaiting it still delivers the error.