Description
Describe the bug
I wanted to try out prepared statement support and measure its performance in pgcat (essentially reproducing the blog). But when running pgbench --select-only
on the main branch I was only able to get ~50 TPS.
To Reproduce
Steps to reproduce the behavior:
git checkout main
- Add
prepared_statements = true
to the minimal config RUST_LOG=info cargo run --release -- pgcat.minimal.toml
pgbench --select-only -T 10 -P 1 -p 6433 --protocol prepared
Expected behavior
Get somewhere in the order of 2000-20000 TPS. But instead I get between 20-50TPS. The worst part is that this even happens when using --protocol simple
. Only if you enable prepared_statements = true
from the config, performance of --protocol simple
returns to normal levels.
Screenshots
I narrowed the regression down commit: 4b78af9
With commit: 4b78af9
With commit right before: 73500c0
Desktop (please complete the following information):
- OS: Linux
Additional info
The reason I was testing pgcat its performance was because I wanted to compare PgBouncer its upcoming prepared statement support (pgbouncer/pgbouncer#845) to pgcat and Odyssey. But pgcat its perf was so much lower than expected that something obviously seemed wrong.