6j1f' | PgBouncer is useful, important, and fraught with peril - JP Camara
https://jpcamara.com/2023/04/12/pgbouncer-is-useful.html
Saved on 2023-09-08 [19608 edays] via jpcamara.com
Modified 2023-09-08 [19608 edays]
postgresql

Over the years I’ve read dozens of articles around scaling and maintaining Postgres databases, and they always understate the impact of PgBouncer on your application. They casually mention unusable features without any exploration, or the numerous ways you can silently break expected query behavior. The advice is just to turn it on. I want it to be clear that as your application scales, PgBouncer is often necessary but isn’t free.

The following sections provide an overview of what connection pooling is in general, how connection pooling modes work in PgBouncer and similar tools, and then I dig into every Postgres feature that does not work in PgBouncer transaction mode and what the implications are. This is the PgBouncer article I wish existed the first time I used it - let’s get going 🐘!