Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
checkpoint
  • Loading branch information
niclaflamme committed Aug 10, 2025
commit 90b8ba9b7bae64f1e4aa31aa192cf76e61564797
15 changes: 7 additions & 8 deletions pgdog/src/frontend/client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -630,15 +630,14 @@ impl Client {
// Is the frontend client in a logical transaction?
let has_logical_tx = self.in_transaction();

// Reconcile, QueryParser might not be active and backend is the source of truth
if has_backend_tx && !has_logical_tx {
self.logical_transaction.soft_begin()?;
}
if !has_backend_tx && has_logical_tx {
self.logical_transaction.reset();
}
// In transaction if buffered BEGIN from client or server is telling us we are.
let in_transaction_for_stats = has_backend_tx || has_logical_tx;

println!("has_backend: {}", has_backend_tx);
println!("has_logical: {}", has_logical_tx);
println!("global: {}", in_transaction_for_stats);

inner.stats.idle(self.logical_transaction.in_transaction());
inner.stats.idle(in_transaction_for_stats);

// Flush mirrors.
if !self.logical_transaction.in_transaction() {
Expand Down
Loading