-
-
Notifications
You must be signed in to change notification settings - Fork 450
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possibility to share the type cache across clients #1039
Comments
Is the bouncer sitting in front of a cluster of Postgresi? If so, I don't know if I'd expect to be able to guarantee that the OIDs of types defined by extensions would be identical across the entire cluster. |
The bouncer is in front of a single PostgreSQL instance. Such a feature should go with a warning that sharing the cache across connections is only safe when the connection are made to the same database and server instance. |
If there's only a single instance, it seems like an application-level connection pool would work? I may be missing something about what value the bouncer provides. |
Our application uses multiple processes so an external connection pooler helps to reduce the number of idle connections. But even without a pooler it may be beneficial to share the type cache between connections within an application-level connection pool. |
It would be great if one would be able to share the type cache, for example by providing a shared instance of the cache when creating a new connection. For larger scale usage of PostgreSQL the usage of external connection poolers like PgBouncer can bring certain benefits. Often this also means using quite short lived connections to a local PgBouncer instance. Every new
client
has a fresh type cache so that leads to unnecessary overhead of looking up type information.Would you be open to add such functionality? Me or one of my colleagues could help by starting a PR.
The text was updated successfully, but these errors were encountered: