Skip to content
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

Add support for automatic pool (similar to pgbouncer) #362

Open
pinaraf opened this issue Mar 14, 2023 · 8 comments
Open

Add support for automatic pool (similar to pgbouncer) #362

pinaraf opened this issue Mar 14, 2023 · 8 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@pinaraf
Copy link

pinaraf commented Mar 14, 2023

Is your feature request related to a problem? Please describe.
For some applications, it may not be possible to list all databases the application can connect to (for instance when each customer has his own database). For these, it's better to use a feature similar to the automatic pool in pgbouncer, cf. https://www.pgbouncer.org/config.html section databases.

Describe the solution you'd like
Be able to describe an automatic pool generator in the configuration.

Describe alternatives you've considered
None known

Additional context
None

@levkk
Copy link
Contributor

levkk commented Mar 14, 2023

Hi there,

I've never used that feature of PgBouncer. Could you give me an example of how it works?

Thanks!

@pinaraf
Copy link
Author

pinaraf commented Mar 14, 2023

Hi

In pgbouncer.ini:

[databases]
* = host=my.server.org port=5432

When a client connects to the bouncer and asks for the database demo, it will spawn a new pool, named demo, for the database demo on my.server.org:5432.
If the client disconnects, the pool will remain "forever" or until autodb_idle_timeout is reached.
The usual server_idle_timeout and server_lifetime rules apply.

Regards

@levkk levkk added enhancement New feature or request help wanted Extra attention is needed labels Mar 14, 2023
@adriangb
Copy link
Contributor

+1 for this feature. I specifically need users wildcards.

@AndrewJackson2020
Copy link
Contributor

+1 for this feature, without it there ends up being a lot of boilerplate and manual upkeep in an environment with a large number of databases and users.

@strelkovia
Copy link

Hi
+1 for this feature

@bharling
Copy link

Hallo! +1 from me too please, this would be really useful

@giovanniborella
Copy link

+1 much needed for use-case

@rvsoni
Copy link

rvsoni commented Nov 17, 2024

I implemented #855 to have PGBouncer pool proxy implementation.

Try this PR #855 or you can use my Repo @rvsoni/pgcat with fix,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

8 participants