Skip to content

Commit 02336be

Browse files
authored
Merge pull request #24 from MaterializeInc/expose-backend-pid
Expose the backend PID on the client
2 parents 91522e4 + d97cf2f commit 02336be

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tokio-postgres/src/client.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -544,6 +544,11 @@ impl Client {
544544
TransactionBuilder::new(self)
545545
}
546546

547+
/// Returns the server's process ID for the connection.
548+
pub fn backend_pid(&self) -> i32 {
549+
self.process_id
550+
}
551+
547552
/// Constructs a cancellation token that can later be used to request cancellation of a query running on the
548553
/// connection associated with this client.
549554
pub fn cancel_token(&self) -> CancelToken {

0 commit comments

Comments
 (0)