Skip to content

Commit

Permalink
Merge pull request #2932 from tsing/fix-copy-in
Browse files Browse the repository at this point in the history
fix(postgres): avoid unnecessary flush in PgCopyIn::read_from
  • Loading branch information
abonander authored Jan 6, 2024
2 parents 2d397a5 + 91c6e66 commit ea4703e
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions sqlx-postgres/src/copy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit ea4703e

Please sign in to comment.