Discussion summary

A discussion on PostgreSQL connection pooling highlights challenges with schema switching, server-side cursors, and scaling. Participants mention tools like pgbouncer, pgdog, and pgpool, and debate the trade-offs of features like query caching and notify performance.

What the discussion says

  • Server-side cursors can cause issues with connection pooling.
  • Scaling pgbouncer involves techniques like so_reuseport.
  • Automatic query routing and sharding are seen as promising.
  • Some see query caching as problematic due to complexity.
“Using server-side cursors is a sign of bad design.”
— HackerThemAll
“pgdog offers advanced features beyond multi-threading.”
— merb

Join the discussion

Write your take first — we'll ask for email only when you're ready to publish.

  • Hacker News
  • What really interests me most is the sharding and the possibility of using this for multitenancy - is the hooks / plugin architecture sufficient so you can run a small sidecar to add shards or tenants to the TOML file dynamically? Would be a game changer.
  • And why it should be done upstream with a thread pool model and an internal scheduler as MS SQL server does.
  • Can someone explain it to me like I am 5. Why did postgres win vs mysql? I don't know many companies at scale that use postgres. Slack, youtube, etc all use a mysql based sharding system https://vitess.io/. I thought the war was lost for postgres, but it seems to keep going. License issues? (Disclosure, I manage 'a few' mysql vms).
  • The SET implementation reads like a cleaner version of how ProxySQL does the same thing, which is nice to see
  • > Since connection poolers reuse connections between clients, the connection state of one client “leaks” into the connection state of another.

    Wow this is very bad. This actually happens in typical Postgres setups?

  • Quick note to say that the article describing WHY you are different and why it matters was very well written. Congrats on the launch!
  • It's awesome to see AGPL instead of the horrible BSL variants that have been going around.
  • The fact that PgDog supports prepared statements[0] is a compelling feature in and of itself. This was a limitation of older versions of pgpool-II[1] thus disqualifying it in efforts where it otherwise could have been beneficial.

    0 - https://docs.pgdog.dev/features/connection-pooler/prepared-s...

    1 - https://www.pgpool.net/docs/4.7/en/html/

Explore Birbla archives