-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
sql/pgwire: buffer messages during COPY TO and startup #99761
Conversation
It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR? 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fancy
e9fd3a1
to
f281dce
Compare
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. Release note: None
This avoids sending each ParameterStatus one-by-one. Release note: None
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
f281dce
to
f7d1256
Compare
bors r+ |
Build failed (retrying...): |
Build failed (retrying...): |
Build failed (retrying...): |
Build succeeded: |
Encountered an error creating backports. Some common things that can go wrong:
You might need to create your backport manually using the backport tool. error setting reviewers, but backport branch blathers/backport-release-23.1-99761 is ready: POST https://api.github.com/repos/cockroachdb/cockroach/pulls/100029/requested_reviewers: 422 Reviews may only be requested from collaborators. One or more of the teams you specified is not a collaborator of the cockroachdb/cockroach repository. [] Backport to branch 23.1.x failed. See errors above. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
blathers backport 23.1 |
Encountered an error creating backports. Some common things that can go wrong:
You might need to create your backport manually using the backport tool. error creating backport branch refs/heads/blathers/backport-release-23.1-99761: POST https://api.github.com/repos/cockroachdb/cockroach/git/refs: 422 Reference already exists [] Backport to branch 23.1 failed. See errors above. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
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