Trait mz_postgres_client::PostgresClientKnobs

source ·
pub trait PostgresClientKnobs:
    Debug
    + Send
    + Sync {
    // Required methods
    fn connection_pool_max_size(&self) -> usize;
    fn connection_pool_max_wait(&self) -> Option<Duration>;
    fn connection_pool_ttl(&self) -> Duration;
    fn connection_pool_ttl_stagger(&self) -> Duration;
    fn connect_timeout(&self) -> Duration;
    fn tcp_user_timeout(&self) -> Duration;
}
Expand description

Configuration knobs for PostgresClient.

Required Methods§

source

fn connection_pool_max_size(&self) -> usize

Maximum number of connections allowed in a pool.

source

fn connection_pool_max_wait(&self) -> Option<Duration>

The maximum time to wait to obtain a connection, if any.

source

fn connection_pool_ttl(&self) -> Duration

Minimum TTL of a connection. It is expected that connections are routinely culled to balance load to the backing store.

source

fn connection_pool_ttl_stagger(&self) -> Duration

Minimum time between TTLing connections. Helps stagger reconnections to avoid stampeding the backing store.

source

fn connect_timeout(&self) -> Duration

Time to wait for a connection to be made before trying.

source

fn tcp_user_timeout(&self) -> Duration

TCP user timeout for connection attempts.

Implementors§