release-23.1: sql/pgwire: buffer messages during COPY TO and startup #100029
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.
Backport 3/3 commits from #99761 on behalf of @rafiss.
/cc @cockroachdb/release
fixes #97314
backport fixes #99546
sql: buffer COPY OUT data
Rather than sending each COPY result row one-by-one, now the data will
get buffered, then flushed when the buffer size limit is reached or when
sending ReadyForQuery.
This fixes an issue that was causing the ruby-pg test to hang, since it assumes
the data will be buffered.
pgwire: buffer startup messages when creating connection
This avoids sending each ParameterStatus one-by-one.
sql: refactor CopyIn handling
This makes it so we don't need to manually send a CommandComplete.
Instead, when the CopyInResult is closed, CommandComplete will be sent,
similar to how it works for other message types.
Release note: None
Release justification: contains a fix for a hanging test