Buffer copy data messages (#265)

* Buffer copy data messages

* Update comment
This commit is contained in:
zainkabani
2022-12-21 09:57:53 -05:00
committed by GitHub
parent de7d7d7d99
commit 8720ed3826

View File

@@ -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.