mirror of
https://github.com/postgresml/pgcat.git
synced 2026-03-23 17:36:28 +00:00
Buffer copy data messages (#265)
* Buffer copy data messages * Update comment
This commit is contained in:
@@ -510,9 +510,13 @@ impl Server {
|
||||
break;
|
||||
}
|
||||
|
||||
// CopyData: we are not buffering this one because there will be many more
|
||||
// and we don't know how big this packet could be, best not to take a risk.
|
||||
'd' => break,
|
||||
// CopyData
|
||||
'd' => {
|
||||
// Don't flush yet, buffer until we reach limit
|
||||
if self.buffer.len() >= 8196 {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// CopyDone
|
||||
// Buffer until ReadyForQuery shows up, so don't exit the loop yet.
|
||||
|
||||
Reference in New Issue
Block a user