postgres-connection-pooling
Installation
SKILL.md
Postgres Connection Pooling
TL;DR: Pick a pool mode based on what session-state your app uses, not on raw concurrency. Session mode is safe but caps you at one client per backend. Transaction mode multiplexes — but breaks
LISTEN,SET, session advisory locks,WITH HOLDcursors, and historically prepared statements (fixed in pgBouncer 1.21+ withmax_prepared_statements). AWS RDS Proxy for Postgres pins on everySET,PREPARE, temp object, or 16+ KB statement. Always tuneidle_in_transaction_session_timeoutto prevent leaks.
Jump to your fire
| Symptom | Section |
|---|---|
| "Too many connections, can't add more lambdas" | Pool mode comparison |
| "Prisma/asyncpg/postgres-js says prepared statements broke" | Prepared statements |
| "Supabase 5432 vs 6543 — which port?" | Supabase Supavisor |
| "RDS Proxy showing high pinned-session count" | RDS Proxy pinning |
"idle in transaction connections holding locks" |
Diagnostics |
| "Need a quick connection-string cheatsheet" | Cheatsheet |