T includes once, step_once, and application transactions kept open while handler
code runs. Sum it across workers sharing the pool; do not add two spare slots per worker.
The spare slots serve different purposes:
- One keeps lease renewal and worker heartbeats moving while callbacks hold transactions.
- One carries admission, enqueue, checkpoints, acknowledgements, duties, inspection, and control API calls.
Backend accounting
- PostgreSQL
- MySQL
- Redis
Push wakeups use one dedicated
LISTEN connection outside the pool and fan it out to
every worker using that store. Poll-only construction has no listener. Share one store
when workers share a pool so five workers do not accidentally create five listeners.Configuration
deadpool_postgres::Pool::status,
pgxpool.Pool.Stat, mysql_async::Pool::metrics, or sql.DB.Stats. A cap prevents
connection explosion; it does not make a saturated pool healthy.
Transaction callback rule
Insideonce or step_once, use the transaction handle supplied to the callback for
application writes and transactional enqueueing. Calling a normal store method while the
callback retains its transaction asks the same pool for another connection and can
deadlock a fully occupied pool.