Skip to content

Commit 5ca5d65

Browse files
authored
On DISCARD ALL, reset client params for re-sync (#509)
1 parent da8d5e6 commit 5ca5d65

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pgdog/src/backend/server.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,11 @@ impl Server {
417417
let cmd = CommandComplete::from_bytes(message.to_bytes()?)?;
418418
match cmd.command() {
419419
"PREPARE" | "DEALLOCATE" => self.sync_prepared = true,
420-
"DEALLOCATE ALL" | "DISCARD ALL" => self.prepared_statements.clear(),
420+
"DEALLOCATE ALL" => self.prepared_statements.clear(),
421+
"DISCARD ALL" => {
422+
self.prepared_statements.clear();
423+
self.client_params.clear();
424+
}
421425
"RESET" => self.client_params.clear(), // Someone reset params, we're gonna need to re-sync.
422426
_ => (),
423427
}

0 commit comments

Comments
 (0)