Merge pull request #2932 from tsing/fix-copy-in

fix(postgres): avoid unnecessary flush in PgCopyIn::read_from
This commit is contained in:
Austin Bonander 2024-01-05 18:36:08 -08:00 committed by GitHub
commit ea4703ea64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -221,10 +221,6 @@ impl<C: DerefMut<Target = PgConnection>> PgCopyIn<C> {
}
let conn: &mut PgConnection = self.conn.as_deref_mut().expect("copy_from: conn taken");
// flush any existing messages in the buffer and clear it
conn.stream.flush().await?;
loop {
let buf = conn.stream.write_buffer_mut();