Subject: TPS in direct Postgres Vs TPS in pgbouncer

From: Raj <[email-masked]>
Date: Sun, 21 Jun 2026 18:54:37 +0530

Hi All,

When the application team is using posytgres directly for 17.9 version,
they get necessary TPS.

When they use pgbouncer, they get 50% reduction in TPS.

What are general advices?

My set up is 3 node PATRONI, where  node3 is DR and manual failover.

Two nodes (node1 and node2) are in site A ..having haproxy, pgnouncer is
bound with haproxy.

---

From: Jorge Batista <[email-masked]>
Date: Sun, 21 Jun 2026 14:37:06 +0000

Raj, when you turned on pgbouncer, did you check if it's set to "transaction mode" & not "session mode"?

Also worth checking if pgbouncer itself is maxing out a CPU core during the slow test, both are common causes of a TPS drop like that, separate from Postgres itself.

Regards,
jorge batista

From: Raj <[email-masked]>
Sent: Sunday, June 21, 2026 9:25 AM
To: Pgsql-admin <[email-masked]>
Subject: TPS in direct Postgres Vs TPS in pgbouncer

EXTERNAL: This email originated from outside of our organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.

Hi All,

When the application team is using posytgres directly for 17.9 version, they get necessary TPS.

Two nodes (node1 and node2) are in site A ..having haproxy, pgnouncer is bound with haproxy.

________________________________

Notice: This e-mail is intended only for the named person or entity to which it is addressed and contains valuable business information that is privileged, confidential and/or otherwise protected from disclosure. Dissemination, distribution or copying of this e-mail or the information herein by anyone other than the intended recipient, or an employee, or agent responsible for delivering the message to the intended recipient, is strictly prohibited. All contents are the copyright property of the sender. If you are not the intended recipient, you are nevertheless bound to respect the sender's worldwide legal rights. We require that unintended recipients delete the e-mail and destroy all electronic copies in their system, retaining no copies in any media. If you have received this e-mail in error, please immediately notify us by returning the e-mail to the sender. We appreciate your cooperation.

---

From: Jeffery Janes <[email-masked]>
Date: Sun, 21 Jun 2026 15:19:14 -0400

> What are general advices?

What is the transaction being used?  If it is something very simple, like
pgbench's built-in -S, then I think this is expected.  Injecting pgbouncer
doubles the amount of network/IPC thrashing needed.  If you have a meaty
transaction, this might not matter but on a very light transaction you
might be doubling something which is already counting for 90% of the time.

Cheers,

Jeff