Skip to main content

Crate mz_postgres_client

Crate mz_postgres_client 

Source
Expand description

A Postgres client that uses deadpool as a connection pool and comes with common/default configuration options.

Modules§

error
PostgresClient-related errors.
metrics
Implementation-specific metrics for the internal, pooled Postgres client.

Structs§

Client
A pooled Postgres connection tagged with the IsolationLevel it was created under.
Manager
A deadpool managed::Manager wrapping deadpool_postgres::Manager. It applies a per-connection isolation level at creation and records that level on every Client it hands out.
PostgresClient
A Postgres client wrapper that uses deadpool as a connection pool.
PostgresClientConfig
Configuration for creating a PostgresClient.

Enums§

IsolationLevel
The transaction isolation level applied to new connections.

Traits§

PostgresClientKnobs
Configuration knobs for PostgresClient.

Type Aliases§

Connection
A connection handed out by PostgresClient::get_connection. Dereferences to a Client, which additionally records the IsolationLevel the connection was created under.
IsolationLevelFn
Resolves the isolation level to apply to a connection. It is invoked once per connection creation, so a dyncfg-backed resolver lets a change take effect as the pool cycles connections.