What problem does it solve?
Connection pooling prevents application workloads from stalling or failing due to limited, expensive database connections, by guiding correct pool sizing, correct proxy/pool mode selection, and fast diagnosis of connection-related failure modes.
Core Features & Use Cases
- Pool sizing with queueing math: Applies Little’s Law and workload concurrency to calculate an appropriate pool size that avoids contention.
- Application vs proxy pooling guidance: Explains how in-process pools (HikariCP, pgx pool, node-postgres Pool) differ from proxy pools (PgBouncer/ProxySQL) and how that changes behavior.
- PgBouncer mode compatibility checks: Covers session, transaction, and statement pooling and how each mode affects feature compatibility (e.g., prepared statements, SET variables, cursors).
- Failure-mode diagnostics: Identifies causes and first checks for symptoms like
too many connections, idle-in-transaction leaks, reconnect storms, and pooling-mode-specific prepared-statement issues.
- Operational verification checklist: Promotes instrumentation and guardrails (acquire/wait metrics, timeouts, connection rotation, reconnect backoff, partitioning pools by query length).
Quick Start
Use the skill to calculate a safe connection pool size for your peak concurrency workload, then choose the appropriate PgBouncer mode and verify feature compatibility for your application.