Skip to content

Commit

Permalink
Merge pull request #24 from MaterializeInc/expose-backend-pid
Browse files Browse the repository at this point in the history
Expose the backend PID on the client
  • Loading branch information
benesch authored Jun 14, 2024
2 parents 91522e4 + d97cf2f commit 02336be
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tokio-postgres/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -544,6 +544,11 @@ impl Client {
TransactionBuilder::new(self)
}

/// Returns the server's process ID for the connection.
pub fn backend_pid(&self) -> i32 {
self.process_id
}

/// Constructs a cancellation token that can later be used to request cancellation of a query running on the
/// connection associated with this client.
pub fn cancel_token(&self) -> CancelToken {
Expand Down

0 comments on commit 02336be

Please sign in to comment.