Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit aefcf42

Browse filesBrowse files
committed
Fix for #534 and #535
1 parent 9d1c46a commit aefcf42
Copy full SHA for aefcf42

File tree

Expand file treeCollapse file tree

3 files changed

+9
-5
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+9
-5
lines changed

‎Cargo.lock

Copy file name to clipboardExpand all lines: Cargo.lock
+1-1Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎pgcat.toml

Copy file name to clipboardExpand all lines: pgcat.toml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ username = "sharding_user"
270270
# if `server_password` is not set.
271271
password = "sharding_user"
272272

273-
pool_mode = "session"
273+
pool_mode = "transaction"
274274

275275
# PostgreSQL username used to connect to the server.
276276
# server_username = "another_user"

‎src/server.rs

Copy file name to clipboardExpand all lines: src/server.rs
+7-3Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -997,7 +997,9 @@ impl Server {
997997
}
998998
}
999999

1000-
self.deallocate(names).await?;
1000+
if !names.is_empty() {
1001+
self.deallocate(names).await?;
1002+
}
10011003

10021004
Ok(())
10031005
}
@@ -1013,15 +1015,17 @@ impl Server {
10131015
/// Close a prepared statement on the server.
10141016
pub async fn deallocate(&mut self, names: Vec<String>) -> Result<(), Error> {
10151017
for name in &names {
1016-
debug!("Deallocating prepared statement `{}`", name);
1018+
info!("Deallocating prepared statement `{}`", name);
10171019

10181020
let close = Close::new(name);
10191021
let bytes: BytesMut = close.try_into()?;
10201022

10211023
self.send(&bytes).await?;
10221024
}
10231025

1024-
self.send(&flush()).await?;
1026+
if !names.is_empty() {
1027+
self.send(&flush()).await?;
1028+
}
10251029

10261030
// Read and discard CloseComplete (3)
10271031
for name in &names {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.