Subject: Pgbouncer

From: Raj <[email-masked]>
Date: Thu, 14 May 2026 17:49:19 +0530

Hi all,

App team using connection pooling and opening 500 sessions which seems to
me stay ,

In this case pgbouncer session pooling or transaction pooling which is
better?

Max_connections in db: 1000

Pool_mode=session
Max connections in pgbouncer: 3000
Default_pool_size=500
Reserve_pool_size=100
Min_pool_size=20

---

From: Laurenz Albe <[email-masked]>
Date: Thu, 14 May 2026 23:35:46 +0200

On Thu, 2026-05-14 at 17:49 +0530, Raj wrote:
> App team using connection pooling and opening 500 sessions which seems to me stay ,
> 
> In this case pgbouncer session pooling or transaction pooling which is better?

Transaction pooling.

> Max connections in pgbouncer: 3000

Too big. Set default_pool_size = min_pool_size = 20, and set reserve_pool_size = 0.
If that turns out to be too small, increase slightly.

Yours,
Laurenz Albe