forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pgwire: fix buffer size limiting behavior for addBatch
Previously, the size of the buffer used to store results before sending them to the client was checked after buffering each batch entirely. This could result in significantly exceeding the buffer memory limit when a batch had wide rows on average. This patch modifies the pwire logic to ensure that `maybeFlush` is called each time a row is buffered. This ensures that the pre-21.2 behavior is preserved. Fixes cockroachdb#83837 Release note (bug fix): Fixed a bug that was introduced in release 21.2 that could cause increased memory usage when scanning a table with wide rows.
- Loading branch information
1 parent
f3b584d
commit cb9d20d
Showing
2 changed files
with
26 additions
and
23 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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