public inbox for pgsql-admin@postgresql.org  
help / color / mirror / Atom feed
Pgbouncer
2+ messages / 2 participants
[nested] [flat]

* Pgbouncer
@ 2026-05-14 12:19 Raj <rajeshkumar.dba09@gmail.com>
  2026-05-14 21:35 ` Re: Pgbouncer Laurenz Albe <laurenz.albe@cybertec.at>
  0 siblings, 1 reply; 2+ messages in thread

From: Raj @ 2026-05-14 12:19 UTC (permalink / raw)
  To: Pgsql-admin <pgsql-admin@lists.postgresql.org>

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


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Pgbouncer
  2026-05-14 12:19 Pgbouncer Raj <rajeshkumar.dba09@gmail.com>
@ 2026-05-14 21:35 ` Laurenz Albe <laurenz.albe@cybertec.at>
  0 siblings, 0 replies; 2+ messages in thread

From: Laurenz Albe @ 2026-05-14 21:35 UTC (permalink / raw)
  To: Raj <rajeshkumar.dba09@gmail.com>; Pgsql-admin <pgsql-admin@lists.postgresql.org>

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 db: 1000
> 
> Pool_mode=session
> Max connections in pgbouncer: 3000
> Default_pool_size=500
> Reserve_pool_size=100
> Min_pool_size=20

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






^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2026-05-14 21:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-05-14 12:19 Pgbouncer Raj <rajeshkumar.dba09@gmail.com>
2026-05-14 21:35 ` Laurenz Albe <laurenz.albe@cybertec.at>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox