Skip to content

fix(postgres): track the ReadyForQuery owed by COPY TO STDOUT - #4454

Open
TannerRogalsky wants to merge 1 commit into
transact-rs:mainfrom
TannerRogalsky:copy-command-cancellation
Open

TannerRogalsky wants to merge 1 commit into
transact-rs:mainfrom
TannerRogalsky:copy-command-cancellation

Conversation

@TannerRogalsky

@TannerRogalsky TannerRogalsky commented Oct 10, 2026 •

Copy link
Copy Markdown

A copy_out_raw cancelled mid-exchange returned its connection to the pool with an untracked ReadyForQuery still pending. The release ping consumed it as its own reply, leaving the connection one reply behind, so its next query failed with "expected ParseComplete, got ReadyForQuery".

This is similar to #3138 and #3139 but related to errors rather than cancellations and timeouts.

#2762 also seems relevant as the copy-in counterpart.

A copy_out_raw cancelled mid-exchange returned its connection to the pool
with an untracked ReadyForQuery still pending. The release ping consumed it
as its own reply, leaving the connection one reply behind, so its next query
failed with "expected ParseComplete, got ReadyForQuery".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant