Postgres module

Pool

structsince 0.27.0Source

Belongs to one scheduler: create it, and use it, on the fibers of one io_run (with io_run_threads, one pool per thread). No locks are involved.

Fields

config: Config
settings: Pool_Config
idle: [..] Idle_Connection
Idle connections, the most recently used last: they are handed out first, so the rest go stale and are closed by idle_timeout when the load drops.
open: s64
Connections open or being opened, idle or borrowed: at most max_size.
changed: Io.Condition
A connection came back or a slot freed up.
closed: bool
maintaining: bool
the background fiber runs: the pool is not freed under it
thread_index: u32
maintainer: Io.Fiber_Handle

See also