fix(postgres): avoid unnecessary flush in PgCopyIn::read_from

This commit is contained in:
Jesse Wang 2023-12-12 22:53:00 +13:00
parent 929af41745
commit 91c6e6668b
No known key found for this signature in database

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();