Just to be sure, Odyssey (or pgBouncer) requires to run on the same box than Postgres, right? So if you are on AWS, you would have to migrate from RDS to running Postgres on a EC2 and install the pooler on the same EC2? Which comes with some big drawbacks (you obviously lose all the benefits of using RDS) but also some benefits (can install every pg extension that you need, have access to every pg settings, etc)
Scalable PostgreSQL Connection Pooler
41–50 of 91 posts
Re: Scalable PostgreSQL Connection Pooler
#42Earlier quoted context omitted.
Yes, that's a problem. We use Docker only for developement. And mostly because Odyssey is based on epoll and just will not compile on MacOS.
so im not sure what you meant by that - because MacOS compatibility is generally unrelated to production (which is almost always on Linux). Am I understanding this wrong ? do you have production workloads that use Odyssey on MacOS ?
Re: Scalable PostgreSQL Connection Pooler
#43Question for anyone who knows a lot about Postgres connection pooling: We want to move to using a connection pooling infrastructure component, but so far, we haven't been able to figure out how to do so given our setup. We've got a wacky data model where we have N Postgres schemas, each of which has the same tables (but with different data, obviously.) They're not tenants; more like separate "datasets." Picture somet…
This may sound naive, but implementing your own pooler is very easy e.g. in Go pgproto3 already does all packet-parsing for you. Transaction poolers are looking on ReadyForQuery packet and it's "in trnsaction" property like this [0]. All you need - is stick server connection on new ParameterStatus[1] packet for "SET search_path" instead of ReadyForQuery. [0] https://github.com/pg-sharding/spqr/blob/358f816cd8a964a9c9…
Re: Scalable PostgreSQL Connection Pooler
#44Earlier quoted context omitted.
This may sound naive, but implementing your own pooler is very easy e.g. in Go pgproto3 already does all packet-parsing for you. Transaction poolers are looking on ReadyForQuery packet and it's "in trnsaction" property like this [0]. All you need - is stick server connection on new ParameterStatus[1] packet for "SET search_path" instead of ReadyForQuery. [0] https://github.com/pg-sharding/spqr/blob/358f816cd8a964a9c9…
It's not enough to intercept `set search_path`, in fact any arbitrary function could change it, but Postgres doesn't report it back, unlike some other gucs.
Re: Scalable PostgreSQL Connection Pooler
#45FWIW I maintain Odyssey and will be happy to answer any question regarding it. Actually there was just a CVE-triggered release... I really hope to release more often with more new functionality. If you are interested in connection pooling maybe you will find interesing SPQR too https://github.com/pg-sharding/spqr Currently it's our experiment to build pooling-based PostgreSQL sharding.
Re: Scalable PostgreSQL Connection Pooler
#46I appreciate the work going on to make high quality poolers for Postgres...I just really wish the work was done in-core so we could have built in connection pooling, or the work done to make grabbing a new connection as cheap as if you were using a pooler. It sucks to have to add complexity to your stack to fix a "deficiency" in Postgres' design. Still, I am glad there is effort put into project even if I selfishly w…
There has been some work towards that - things did get cheaper in 14. Note that you very well might still want a separately run pooler for some workloads - having local poolers on application servers can be good for latency.
Re: Scalable PostgreSQL Connection Pooler
#47Re: Scalable PostgreSQL Connection Pooler
#48Why might I want to use this or pgbouncer instead of, say, the connection pooling built into ORMs like SQLAlchemy?
The ORM connection pooler is client-side - so each instance of your application using SQLAlchemy will have its own connection pool. This may become unwieldy as you scale up the number of app servers/containers/processes. In contrast, connection poolers like Odyssey or pgbouncer live external to your applications, meaning that: 1. You can connect to them from any application written in any language (not just Python) 2…
Re: Scalable PostgreSQL Connection Pooler
#49Has anyone used Yandex Cloud [0] in production?, How does it compare to DigitalOcean, AWS, GCP and others? Also the tech from Yandex such as Clickhouse [1] is really interesting, as they recently spun it out of Yandex. [0] https://cloud.yandex.com/en/ [1] https://clickhouse.com/
It's an impressive piece of engineering. The best column-oriented DB in the open source space, I would say.
Re: Scalable PostgreSQL Connection Pooler
#50Why might I want to use this or pgbouncer instead of, say, the connection pooling built into ORMs like SQLAlchemy?