Does anyone run Postgres without PgBouncer?

(brandur.org)

44 points | by abelanger 3 days ago

15 comments

  • conradludgate 2 minutes ago
    (I work on the postgres proxy layer at Neon)

    PgBouncer is entirely optional and it's not always the right choice. If you have a classical app (non serverless) and you can maintain a connection pool from your app, then I recommend avoiding pgbouncer.

    The benefits of pgbouncer mostly come from irregular client connections (too many, too much churn). If you don't have that problem, go direct to postgres.

    I'm exploring replacing pgbouncer with an alternative (maybe home grown) at the moment. Mostly for multi-tenancy and HA reasons. Pgbouncer has been good for us, but it's limited in how we can deploy it in a multi-tenant environment.

  • theandrewbailey 9 minutes ago
    Yes. Sometimes PostgreSQL is overkill for a low traffic, simple application. PgBouncer would be even more overkill and add unnecessary complexity.
  • grsmvg 10 minutes ago
    If you don’t use serverless but instead a few (vertically scaling) servers, and your ORM / query builder supports pooling (all node libraries I’ve used have a pooler)…

    Having a setup with just a simple docker deploy, running a monolith, not using pgbouncer so you can use LISTEN/NOTIFY to implement your own job queue:

    https://www.dbos.dev/blog/postgres-listen-notify-scalability

    This gives me warm fuzzy feelings, also making me relatively cloud-agnostic in the process, even though devops is not my strong point.

    Most projects I do don’t need something more complex or vendor locked-in than this.

  • chuckadams 10 minutes ago
    I guarantee you the vast majority of RDS instances aren't using RDS Proxy. For one, it's rather expensive.
  • achanda358 3 minutes ago
    A whole bunch of Cloudflare clients run Postgres (self hosted) without pgbouncer (they use hyperdrive).
  • 1over137 17 minutes ago
    Yes. I've never even heard of PgBouncer.
    • LtWorf 4 minutes ago
      Me too. I even opened the page and I'm not sure of what's the problem being solved.
    • mlnj 14 minutes ago
      PgBouncer? Don't even know er.
  • hoppp 38 minutes ago
    Yes, I don't always need it. Depends on the service architecture.
  • zzzeek 3 minutes ago
    of course, the vast, vast majority of PostgreSQL users outside of managed cloud hosting are not using pgbouncer. pgbouncer introduces complexities into the database conversation (transaction-level pooling interacting with the prepared statement cache is a long recurring nightmare for us at sqlalchemy) that often not worth the complexity for small local installations.

    this article seems to be talking about commercial cloud managed PG services, which yes, those absolutely need to support connection pooling and of course they're going to use pgbouncer.

  • barelysapient 21 minutes ago
    Yes.
  • alexthedigger 44 minutes ago
    Yes
  • lazyc97 13 minutes ago
    Yes, except for serverless backend, you normally don't need it.
  • ParadisoShlee 17 minutes ago
    pgdog.
  • root-parent 38 minutes ago
    Are you kidding me? Have you heard about Data Direct?

    https://docs.progress.com/bundle/datadirect-postgresql-odbc-...

  • Arsen-V 46 minutes ago
    [dead]
  • bakoserge 3 days ago
    [flagged]