Suggest an editImprove this articleRefine the answer for “What is PgBouncer and why do you need it?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)**PgBouncer** is a lightweight **connection pooler** for PostgreSQL that acts as a middleman between the application and the database: opening a new PostgreSQL connection requires significant resources (process initialization, authorization, memory allocation), and with a large number of clients this becomes a bottleneck. **Key point:** PgBouncer keeps a **limited number of active connections** to PostgreSQL and hands the application one of the existing ones instead of creating a new one - this significantly reduces load on the DB server, speeds up application response times with many clients, and lets you manage connection limits centrally.Shown above the full answer for quick recall.Answer (EN)Image**PgBouncer** is a lightweight **connection pooler** for PostgreSQL. It acts as a middleman between the application and the database. When an application opens a new connection to PostgreSQL, it costs significant resources: process initialization, authorization, memory allocation. With a large number of clients, this becomes a bottleneck. ### How PgBouncer solves this 1. It keeps a **limited number of active connections** to PostgreSQL. 2. When the application requests a connection, PgBouncer hands out one of the existing ones instead of creating a new one. 3. After the query finishes, the connection goes back into the pool and can be reused. ### Advantages - significantly reduces load on the database server; - speeds up application response time with many clients; - lets you manage connection limits and timeout policy centrally; - improves resilience, brief PostgreSQL outages can be recovered from without restarting applications. In short, PgBouncer is a "buffer" that makes working with PostgreSQL faster, more stable, and more resource-efficient.For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.