Skip to main content

Module async_pool

Module async_pool 

Source
Expand description

Pool of AsyncConns for spreading load across multiple PostgreSQL backends.

Each AsyncConn maintains its own TCP connection, writer task, and reader task. The pool dispatches requests round-robin across connections using an atomic counter. Dead connections are detected and replaced transparently.

Structsยง

AsyncPool
A pool of N AsyncConns for parallel PostgreSQL backend utilization. Detects dead connections and replaces them automatically.
ConnConfig
Connection configuration for reconnection.