agora inbox for pgsql-admin@postgresql.org
help / color / mirror / Atom feedPgbouncer
17+ messages / 7 participants
[nested] [flat]
* Pgbouncer
@ 2023-11-16 05:43 Rajesh Kumar <rajeshkumar.dba09@gmail.com>
2023-11-16 11:59 ` Re: Pgbouncer Erik Wienhold <ewie@ewie.name>
0 siblings, 1 reply; 17+ messages in thread
From: Rajesh Kumar @ 2023-11-16 05:43 UTC (permalink / raw)
To: Pgsql-admin <pgsql-admin@lists.postgresql.org>
Hi all
I am using postgres 15 in redhat openshift container. I am trying to
configure pgbouncer.
I want to know how to find in database whether the connections are from
pgbouncer or direct connections? Or, is there any other way to monitor in
this environment?
^ permalink raw reply [nested|flat] 17+ messages in thread
* Re: Pgbouncer
2023-11-16 05:43 Pgbouncer Rajesh Kumar <rajeshkumar.dba09@gmail.com>
@ 2023-11-16 11:59 ` Erik Wienhold <ewie@ewie.name>
2023-11-16 12:17 ` Re: Pgbouncer Achilleas Mantzios - cloud <a.mantzios@cloud.gatewaynet.com>
0 siblings, 1 reply; 17+ messages in thread
From: Erik Wienhold @ 2023-11-16 11:59 UTC (permalink / raw)
To: Rajesh Kumar <rajeshkumar.dba09@gmail.com>; +Cc: Pgsql-admin <pgsql-admin@lists.postgresql.org>
On 2023-11-16 06:43 +0100, Rajesh Kumar wrote:
> I am using postgres 15 in redhat openshift container. I am trying to
> configure pgbouncer.
>
> I want to know how to find in database whether the connections are from
> pgbouncer or direct connections? Or, is there any other way to monitor in
> this environment?
You can check column pg_stat_activity.client_addr if your pgbouncer and
the clients making direct connections are on different hosts.
Otherwise you can list pgbouncer's connections with SHOW SERVERS in the
admin console[1] and cross-check with pg_stat_activity. Columns
local_addr and local_port of SHOW SERVERS matches client_addr and
client_port in pg_stat_activity. The remaining connections in
pg_stat_activity should be from other clients and backends.
[1] https://www.pgbouncer.org/usage.html#admin-console
--
Erik
^ permalink raw reply [nested|flat] 17+ messages in thread
* Re: Pgbouncer
2023-11-16 05:43 Pgbouncer Rajesh Kumar <rajeshkumar.dba09@gmail.com>
2023-11-16 11:59 ` Re: Pgbouncer Erik Wienhold <ewie@ewie.name>
@ 2023-11-16 12:17 ` Achilleas Mantzios - cloud <a.mantzios@cloud.gatewaynet.com>
2023-11-22 08:20 ` Re: Pgbouncer Rajesh Kumar <rajeshkumar.dba09@gmail.com>
0 siblings, 1 reply; 17+ messages in thread
From: Achilleas Mantzios - cloud @ 2023-11-16 12:17 UTC (permalink / raw)
To: pgsql-admin@lists.postgresql.org
On 11/16/23 13:59, Erik Wienhold wrote:
> On 2023-11-16 06:43 +0100, Rajesh Kumar wrote:
>> I am using postgres 15 in redhat openshift container. I am trying to
>> configure pgbouncer.
>>
>> I want to know how to find in database whether the connections are from
>> pgbouncer or direct connections? Or, is there any other way to monitor in
>> this environment?
> You can check column pg_stat_activity.client_addr if your pgbouncer and
> the clients making direct connections are on different hosts.
>
> Otherwise you can list pgbouncer's connections with SHOW SERVERS in the
> admin console[1] and cross-check with pg_stat_activity. Columns
> local_addr and local_port of SHOW SERVERS matches client_addr and
> client_port in pg_stat_activity. The remaining connections in
> pg_stat_activity should be from other clients and backends.
In addition to what Erik said, there is pgbouncer_fdw, which makes
several pg_bouncer real time monitoring data available as foreign
tables, so you can join pg_stat_activity with pgbouncer_servers
and draw conclusions.
>
> [1]https://www.pgbouncer.org/usage.html#admin-console
>
^ permalink raw reply [nested|flat] 17+ messages in thread
* Re: Pgbouncer
2023-11-16 05:43 Pgbouncer Rajesh Kumar <rajeshkumar.dba09@gmail.com>
2023-11-16 11:59 ` Re: Pgbouncer Erik Wienhold <ewie@ewie.name>
2023-11-16 12:17 ` Re: Pgbouncer Achilleas Mantzios - cloud <a.mantzios@cloud.gatewaynet.com>
@ 2023-11-22 08:20 ` Rajesh Kumar <rajeshkumar.dba09@gmail.com>
2023-11-22 12:32 ` Re: Pgbouncer Erik Wienhold <ewie@ewie.name>
0 siblings, 1 reply; 17+ messages in thread
From: Rajesh Kumar @ 2023-11-22 08:20 UTC (permalink / raw)
To: Achilleas Mantzios - cloud <a.mantzios@cloud.gatewaynet.com>; +Cc: Pgsql-admin <pgsql-admin@lists.postgresql.org>
I have already created postgres_fdw extension. But I am getting error
during pgbouncer extension.
On Thu, 16 Nov 2023, 17:47 Achilleas Mantzios - cloud, <
a.mantzios@cloud.gatewaynet.com> wrote:
>
> On 11/16/23 13:59, Erik Wienhold wrote:
>
> On 2023-11-16 06:43 +0100, Rajesh Kumar wrote:
>
> I am using postgres 15 in redhat openshift container. I am trying to
> configure pgbouncer.
>
> I want to know how to find in database whether the connections are from
> pgbouncer or direct connections? Or, is there any other way to monitor in
> this environment?
>
>
> You can check column pg_stat_activity.client_addr if your pgbouncer and
> the clients making direct connections are on different hosts.
>
> Otherwise you can list pgbouncer's connections with SHOW SERVERS in the
> admin console[1] and cross-check with pg_stat_activity. Columns
> local_addr and local_port of SHOW SERVERS matches client_addr and
> client_port in pg_stat_activity. The remaining connections in
> pg_stat_activity should be from other clients and backends.
>
> In addition to what Erik said, there is pgbouncer_fdw, which makes
> several pg_bouncer real time monitoring data available as foreign tables,
> so you can join pg_stat_activity with pgbouncer_servers
> and draw conclusions.
>
>
>
> [1] https://www.pgbouncer.org/usage.html#admin-console
>
>
^ permalink raw reply [nested|flat] 17+ messages in thread
* Re: Pgbouncer
2023-11-16 05:43 Pgbouncer Rajesh Kumar <rajeshkumar.dba09@gmail.com>
2023-11-16 11:59 ` Re: Pgbouncer Erik Wienhold <ewie@ewie.name>
2023-11-16 12:17 ` Re: Pgbouncer Achilleas Mantzios - cloud <a.mantzios@cloud.gatewaynet.com>
2023-11-22 08:20 ` Re: Pgbouncer Rajesh Kumar <rajeshkumar.dba09@gmail.com>
@ 2023-11-22 12:32 ` Erik Wienhold <ewie@ewie.name>
2023-11-22 15:07 ` Re: Pgbouncer Rajesh Kumar <rajeshkumar.dba09@gmail.com>
0 siblings, 1 reply; 17+ messages in thread
From: Erik Wienhold @ 2023-11-22 12:32 UTC (permalink / raw)
To: Rajesh Kumar <rajeshkumar.dba09@gmail.com>; +Cc: Achilleas Mantzios - cloud <a.mantzios@cloud.gatewaynet.com>; Pgsql-admin <pgsql-admin@lists.postgresql.org>
On 2023-11-22 09:20 +0100, Rajesh Kumar wrote:
> I have already created postgres_fdw extension. But I am getting error
> during pgbouncer extension.
What statements do you execute and what error do you get?
--
Erik
^ permalink raw reply [nested|flat] 17+ messages in thread
* Re: Pgbouncer
2023-11-16 05:43 Pgbouncer Rajesh Kumar <rajeshkumar.dba09@gmail.com>
2023-11-16 11:59 ` Re: Pgbouncer Erik Wienhold <ewie@ewie.name>
2023-11-16 12:17 ` Re: Pgbouncer Achilleas Mantzios - cloud <a.mantzios@cloud.gatewaynet.com>
2023-11-22 08:20 ` Re: Pgbouncer Rajesh Kumar <rajeshkumar.dba09@gmail.com>
2023-11-22 12:32 ` Re: Pgbouncer Erik Wienhold <ewie@ewie.name>
@ 2023-11-22 15:07 ` Rajesh Kumar <rajeshkumar.dba09@gmail.com>
2023-11-22 15:41 ` Re: Pgbouncer Erik Wienhold <ewie@ewie.name>
0 siblings, 1 reply; 17+ messages in thread
From: Rajesh Kumar @ 2023-11-22 15:07 UTC (permalink / raw)
To: Erik Wienhold <ewie@ewie.name>; +Cc: Achilleas Mantzios - cloud <a.mantzios@cloud.gatewaynet.com>; Pgsql-admin <pgsql-admin@lists.postgresql.org>
I am using openshift env and postgres 15.2.
I want to monitor pgbouncer which is deployed as separate pod. And postgres
instances are deployed as separate pod.
On Wed, 22 Nov 2023, 18:03 Erik Wienhold, <ewie@ewie.name> wrote:
> On 2023-11-22 09:20 +0100, Rajesh Kumar wrote:
> > I have already created postgres_fdw extension. But I am getting error
> > during pgbouncer extension.
>
> What statements do you execute and what error do you get?
>
> --
> Erik
>
^ permalink raw reply [nested|flat] 17+ messages in thread
* Re: Pgbouncer
2023-11-16 05:43 Pgbouncer Rajesh Kumar <rajeshkumar.dba09@gmail.com>
2023-11-16 11:59 ` Re: Pgbouncer Erik Wienhold <ewie@ewie.name>
2023-11-16 12:17 ` Re: Pgbouncer Achilleas Mantzios - cloud <a.mantzios@cloud.gatewaynet.com>
2023-11-22 08:20 ` Re: Pgbouncer Rajesh Kumar <rajeshkumar.dba09@gmail.com>
2023-11-22 12:32 ` Re: Pgbouncer Erik Wienhold <ewie@ewie.name>
2023-11-22 15:07 ` Re: Pgbouncer Rajesh Kumar <rajeshkumar.dba09@gmail.com>
@ 2023-11-22 15:41 ` Erik Wienhold <ewie@ewie.name>
2023-11-22 17:02 ` Re: Pgbouncer Rajesh Kumar <rajeshkumar.dba09@gmail.com>
0 siblings, 1 reply; 17+ messages in thread
From: Erik Wienhold @ 2023-11-22 15:41 UTC (permalink / raw)
To: Rajesh Kumar <rajeshkumar.dba09@gmail.com>; +Cc: Pgsql-admin <pgsql-admin@lists.postgresql.org>
On 2023-11-22 16:07 +0100, Rajesh Kumar wrote:
> I am using openshift env and postgres 15.2.
> I want to monitor pgbouncer which is deployed as separate pod. And postgres
> instances are deployed as separate pod.
This doesn't answer my question on what statements do you execute and
what error do you get.
--
Erik
^ permalink raw reply [nested|flat] 17+ messages in thread
* Re: Pgbouncer
2023-11-16 05:43 Pgbouncer Rajesh Kumar <rajeshkumar.dba09@gmail.com>
2023-11-16 11:59 ` Re: Pgbouncer Erik Wienhold <ewie@ewie.name>
2023-11-16 12:17 ` Re: Pgbouncer Achilleas Mantzios - cloud <a.mantzios@cloud.gatewaynet.com>
2023-11-22 08:20 ` Re: Pgbouncer Rajesh Kumar <rajeshkumar.dba09@gmail.com>
2023-11-22 12:32 ` Re: Pgbouncer Erik Wienhold <ewie@ewie.name>
2023-11-22 15:07 ` Re: Pgbouncer Rajesh Kumar <rajeshkumar.dba09@gmail.com>
2023-11-22 15:41 ` Re: Pgbouncer Erik Wienhold <ewie@ewie.name>
@ 2023-11-22 17:02 ` Rajesh Kumar <rajeshkumar.dba09@gmail.com>
2023-11-22 17:11 ` Re: Pgbouncer Erik Wienhold <ewie@ewie.name>
0 siblings, 1 reply; 17+ messages in thread
From: Rajesh Kumar @ 2023-11-22 17:02 UTC (permalink / raw)
To: Erik Wienhold <ewie@ewie.name>; +Cc: Pgsql-admin <pgsql-admin@lists.postgresql.org>
Lets forget the errors...how to configure to monitor connections coming
from pgbouncer
On Wed, 22 Nov 2023, 21:11 Erik Wienhold, <ewie@ewie.name> wrote:
> On 2023-11-22 16:07 +0100, Rajesh Kumar wrote:
> > I am using openshift env and postgres 15.2.
> > I want to monitor pgbouncer which is deployed as separate pod. And
> postgres
> > instances are deployed as separate pod.
>
> This doesn't answer my question on what statements do you execute and
> what error do you get.
>
> --
> Erik
>
^ permalink raw reply [nested|flat] 17+ messages in thread
* Re: Pgbouncer
2023-11-16 05:43 Pgbouncer Rajesh Kumar <rajeshkumar.dba09@gmail.com>
2023-11-16 11:59 ` Re: Pgbouncer Erik Wienhold <ewie@ewie.name>
2023-11-16 12:17 ` Re: Pgbouncer Achilleas Mantzios - cloud <a.mantzios@cloud.gatewaynet.com>
2023-11-22 08:20 ` Re: Pgbouncer Rajesh Kumar <rajeshkumar.dba09@gmail.com>
2023-11-22 12:32 ` Re: Pgbouncer Erik Wienhold <ewie@ewie.name>
2023-11-22 15:07 ` Re: Pgbouncer Rajesh Kumar <rajeshkumar.dba09@gmail.com>
2023-11-22 15:41 ` Re: Pgbouncer Erik Wienhold <ewie@ewie.name>
2023-11-22 17:02 ` Re: Pgbouncer Rajesh Kumar <rajeshkumar.dba09@gmail.com>
@ 2023-11-22 17:11 ` Erik Wienhold <ewie@ewie.name>
0 siblings, 0 replies; 17+ messages in thread
From: Erik Wienhold @ 2023-11-22 17:11 UTC (permalink / raw)
To: Rajesh Kumar <rajeshkumar.dba09@gmail.com>; +Cc: Pgsql-admin <pgsql-admin@lists.postgresql.org>
On 2023-11-22 18:02 +0100, Rajesh Kumar wrote:
> Lets forget the errors...how to configure to monitor connections coming
> from pgbouncer
Did you follow the setup described in pgbouncer_fdw's readme[1]?
The pgbouncer connections are in view pgbouncer_servers. How to query
that view depends on your monitoring tool.
[1] https://github.com/CrunchyData/pgbouncer_fdw/blob/main/README.md
--
Erik
^ permalink raw reply [nested|flat] 17+ messages in thread
* Pgbouncer
@ 2024-01-23 20:58 Rajesh Kumar <rajeshkumar.dba09@gmail.com>
2024-01-23 21:39 ` Re: Pgbouncer Samed YILDIRIM <samed@reddoc.net>
0 siblings, 1 reply; 17+ messages in thread
From: Rajesh Kumar @ 2024-01-23 20:58 UTC (permalink / raw)
To: Pgsql-admin <pgsql-admin@lists.postgresql.org>
Hi all,
I have been facing difficulty to configure pgbouncer for past 2 months. I
get lot of errors such as query_wait_timeout error, server_idle_timeout
error etc.
Using session mode. Plz help me with the pgbouncer configuration (I have
tried enough from internet answers).
My requirement is simply handle idle connections but there should always
have one connection open per client.
^ permalink raw reply [nested|flat] 17+ messages in thread
* Re: Pgbouncer
2024-01-23 20:58 Pgbouncer Rajesh Kumar <rajeshkumar.dba09@gmail.com>
@ 2024-01-23 21:39 ` Samed YILDIRIM <samed@reddoc.net>
0 siblings, 0 replies; 17+ messages in thread
From: Samed YILDIRIM @ 2024-01-23 21:39 UTC (permalink / raw)
To: Rajesh Kumar <rajeshkumar.dba09@gmail.com>; +Cc: Pgsql-admin <pgsql-admin@lists.postgresql.org>
Hi Rajesh,
Without taking into account PgBouncer, what is your actual requirement?
What are you trying to achieve?
I believe there is a misunderstanding with the actual purpose and role of
PgBouncer and the concept of connection pooler.
Using session mode.
>
My requirement is simply handle idle connections but there should always
> have one connection open per client.
Do you want to have or not to have idle connections on the database?
Just to give a brief background information; PostgreSQL is process based.
While a new database connection is starting, postgres process forks. And,
this is an expensive operation and takes time.
PgBouncer is a connection pooler. It keeps database connections open and
idle. Whenever a client wants to establish a new database connection,
PgBouncer assigns an idle database connection from its appropriate
connection pool to the client. Thanks to having open and idle connections
on the database at PgBouncer's disposal, starting a new connection to the
database becomes less expensive, more efficient, and faster. In this
picture, clients start connections to PgBouncer instead of directly to the
database.
Shortly, the expensive connection initialisation cost is paid once at the
beginning. And the same connections are used by multiple clients multiple
times.
If you have PgBouncer in your setup, you will have some idle database
connections, which is sort of the desired result, unless you have too many
idle database connections. Definition of "too many" is context dependent.
I also recommend you to review the reason why you use session mode for
connection pool. Does the application depend on some session level features
of PostgreSQL?
Best regards.
Samed YILDIRIM
On Tue, 23 Jan 2024 at 22:58, Rajesh Kumar <rajeshkumar.dba09@gmail.com>
wrote:
> Hi all,
>
>
> I have been facing difficulty to configure pgbouncer for past 2 months. I
> get lot of errors such as query_wait_timeout error, server_idle_timeout
> error etc.
>
> Using session mode. Plz help me with the pgbouncer configuration (I have
> tried enough from internet answers).
>
> My requirement is simply handle idle connections but there should always
> have one connection open per client.
>
^ permalink raw reply [nested|flat] 17+ messages in thread
* Pgbouncer
@ 2025-09-11 13:31 Raj <rajeshkumar.dba09@gmail.com>
2025-09-11 13:55 ` Re: Pgbouncer hubert depesz lubaczewski <depesz@depesz.com>
0 siblings, 1 reply; 17+ messages in thread
From: Raj @ 2025-09-11 13:31 UTC (permalink / raw)
To: Pgsql-admin <pgsql-admin@lists.postgresql.org>
We are migrating from oracle.to postgres and its done.
Now as a DBA, to improve performance say idle connecting handling or
anything, if I want to recommend pgbouncer to the team, what's the
compelling reason would it be?
I may ask them to handle connections from application end and they may say
ok but we still.may see idle connections are not closed.
So, at point and for what compelling reason I should tell my manager, we
must go-ahead and use etc.
We use pg17 and in postgres itself I know idle_session_timeount,
transaction_timeout, statement_timeout. Is this enough? Will it abruptly
kill queries and if so, isn't it bad?
^ permalink raw reply [nested|flat] 17+ messages in thread
* Re: Pgbouncer
2025-09-11 13:31 Pgbouncer Raj <rajeshkumar.dba09@gmail.com>
@ 2025-09-11 13:55 ` hubert depesz lubaczewski <depesz@depesz.com>
2025-09-11 16:41 ` Re: Pgbouncer Raj <rajeshkumar.dba09@gmail.com>
0 siblings, 1 reply; 17+ messages in thread
From: hubert depesz lubaczewski @ 2025-09-11 13:55 UTC (permalink / raw)
To: Raj <rajeshkumar.dba09@gmail.com>; +Cc: Pgsql-admin <pgsql-admin@lists.postgresql.org>
On Thu, Sep 11, 2025 at 07:01:26PM +0530, Raj wrote:
> We are migrating from oracle.to postgres and its done.
>
> Now as a DBA, to improve performance say idle connecting handling or
> anything, if I want to recommend pgbouncer to the team, what's the
> compelling reason would it be?
https://www.depesz.com/2012/12/02/what-is-the-point-of-bouncing/
> I may ask them to handle connections from application end and they may say
> ok but we still.may see idle connections are not closed.
>
> So, at point and for what compelling reason I should tell my manager, we
> must go-ahead and use etc.
>
> We use pg17 and in postgres itself I know idle_session_timeount,
> transaction_timeout, statement_timeout. Is this enough? Will it abruptly
> kill queries and if so, isn't it bad?
statement_timeout and transaction_timeout have the power to kill
queries, yes.
Best regards,
depesz
^ permalink raw reply [nested|flat] 17+ messages in thread
* Re: Pgbouncer
2025-09-11 13:31 Pgbouncer Raj <rajeshkumar.dba09@gmail.com>
2025-09-11 13:55 ` Re: Pgbouncer hubert depesz lubaczewski <depesz@depesz.com>
@ 2025-09-11 16:41 ` Raj <rajeshkumar.dba09@gmail.com>
2025-09-12 05:26 ` Re: Pgbouncer Laurenz Albe <laurenz.albe@cybertec.at>
0 siblings, 1 reply; 17+ messages in thread
From: Raj @ 2025-09-11 16:41 UTC (permalink / raw)
To: depesz@depesz.com; +Cc: Pgsql-admin <pgsql-admin@lists.postgresql.org>
I am asking should we use pgbouncer? If so, what's the compelling situation
despite having postgres inbuilt timeout parameters.
On Thu, 11 Sept 2025, 19:25 hubert depesz lubaczewski, <depesz@depesz.com>
wrote:
> On Thu, Sep 11, 2025 at 07:01:26PM +0530, Raj wrote:
> > We are migrating from oracle.to postgres and its done.
> >
> > Now as a DBA, to improve performance say idle connecting handling or
> > anything, if I want to recommend pgbouncer to the team, what's the
> > compelling reason would it be?
>
> https://www.depesz.com/2012/12/02/what-is-the-point-of-bouncing/
>
> > I may ask them to handle connections from application end and they may
> say
> > ok but we still.may see idle connections are not closed.
> >
> > So, at point and for what compelling reason I should tell my manager, we
> > must go-ahead and use etc.
> >
> > We use pg17 and in postgres itself I know idle_session_timeount,
> > transaction_timeout, statement_timeout. Is this enough? Will it abruptly
> > kill queries and if so, isn't it bad?
>
> statement_timeout and transaction_timeout have the power to kill
> queries, yes.
>
> Best regards,
>
> depesz
>
>
^ permalink raw reply [nested|flat] 17+ messages in thread
* Re: Pgbouncer
2025-09-11 13:31 Pgbouncer Raj <rajeshkumar.dba09@gmail.com>
2025-09-11 13:55 ` Re: Pgbouncer hubert depesz lubaczewski <depesz@depesz.com>
2025-09-11 16:41 ` Re: Pgbouncer Raj <rajeshkumar.dba09@gmail.com>
@ 2025-09-12 05:26 ` Laurenz Albe <laurenz.albe@cybertec.at>
0 siblings, 0 replies; 17+ messages in thread
From: Laurenz Albe @ 2025-09-12 05:26 UTC (permalink / raw)
To: Raj <rajeshkumar.dba09@gmail.com>; depesz@depesz.com; +Cc: Pgsql-admin <pgsql-admin@lists.postgresql.org>
On Thu, 2025-09-11 at 22:11 +0530, Raj wrote:
> I am asking should we use pgbouncer? If so, what's the compelling situation
> despite having postgres inbuilt timeout parameters.
Timeouts and connection pooling have little to do with each other.
You want timeouts so that statements and transactions cannot take too long,
hog resources and damage your database.
Connection pooling has a different purpose. It is necessary, because you
cannot afford to have short-lived database sessions. So you want persistent
database session, but you don't want too many of them because
- the more you have, the bigger the risk of overloading the database
- if you have many connections, you cannot set "work_mem" too high, which
will be bad for the performance of your SQL statements
- switching between processes means overhead for the kernel
- the more sessions you have, the longer the snapshot PostgreSQL takes at
the start of each statement will take
If you have a single application server, you don't need pgBouncer. Simply
use the connection pooler built into your application server. Only when you
start many instances of your application server (which would mean many pools)
you need an external pooler like pgBouncer.
If you want more reading material:
https://www.cybertec-postgresql.com/estimating-connection-pool-size-with-postgresql-database-statist...
https://www.cybertec-postgresql.com/tuning-max_connections-in-postgresql/
https://www.postgresql.eu/events/pgconfeu2022/sessions/session/3811/slides/327/1000_application_user...
Yours,
Laurenz Albe
^ permalink raw reply [nested|flat] 17+ messages in thread
* 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; 17+ 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] 17+ 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; 17+ 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] 17+ messages in thread
end of thread, other threads:[~2026-05-14 21:35 UTC | newest]
Thread overview: 17+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-11-16 05:43 Pgbouncer Rajesh Kumar <rajeshkumar.dba09@gmail.com>
2023-11-16 11:59 ` Erik Wienhold <ewie@ewie.name>
2023-11-16 12:17 ` Achilleas Mantzios - cloud <a.mantzios@cloud.gatewaynet.com>
2023-11-22 08:20 ` Rajesh Kumar <rajeshkumar.dba09@gmail.com>
2023-11-22 12:32 ` Erik Wienhold <ewie@ewie.name>
2023-11-22 15:07 ` Rajesh Kumar <rajeshkumar.dba09@gmail.com>
2023-11-22 15:41 ` Erik Wienhold <ewie@ewie.name>
2023-11-22 17:02 ` Rajesh Kumar <rajeshkumar.dba09@gmail.com>
2023-11-22 17:11 ` Erik Wienhold <ewie@ewie.name>
2024-01-23 20:58 Pgbouncer Rajesh Kumar <rajeshkumar.dba09@gmail.com>
2024-01-23 21:39 ` Samed YILDIRIM <samed@reddoc.net>
2025-09-11 13:31 Pgbouncer Raj <rajeshkumar.dba09@gmail.com>
2025-09-11 13:55 ` hubert depesz lubaczewski <depesz@depesz.com>
2025-09-11 16:41 ` Raj <rajeshkumar.dba09@gmail.com>
2025-09-12 05:26 ` Laurenz Albe <laurenz.albe@cybertec.at>
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