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

Have Different default_pool_size for two seperate database #631

Closed
kumarashish071092 opened this issue Apr 18, 2024 · 6 comments
Closed
Labels
question Further information is requested

Comments

@kumarashish071092
Copy link

can we add settings in pgbouncer separately for a database which would be different from other databases:

I have two databases :

test
test1

Can I set something with test database is having default_pool_size =20 for all user/database set and test1 database having default_pool_size =40 >

I know it was implemented in few enterprise databases ( EDB,Crunchy etc) . Can we implement this in our playbooks ?

Thanks ,
Ashish

@vitabaks vitabaks added the question Further information is requested label Apr 18, 2024
@vitabaks
Copy link
Owner

vitabaks commented Apr 18, 2024

Yes, just describe the configuration of your pools in pgbouncer_pools variable, an example:

pgbouncer_pools:
  - { name: "postgres", dbname: "postgres", pool_parameters: "" }
  - { name: "test", dbname: "test", pool_parameters: "pool_size=20 pool_mode=transaction" }
  - { name: "test1", dbname: "test1", pool_parameters: "pool_size=40 pool_mode=transaction" }

Note: Pay attention to pool_mode, it is recommended to use "transaction" if your application supports this pool solver.

And run playbook config_pgcluster.yml to apply the changes

ansible-playbook config_pgcluster.yml --tags "pgbouncer_conf"

@kumarashish071092
Copy link
Author

kumarashish071092 commented Apr 19, 2024 via email

@vitabaks
Copy link
Owner

Please attach pgbouncer.log

@kumarashish071092
Copy link
Author

kumarashish071092 commented Apr 19, 2024 via email

@vitabaks
Copy link
Owner

vitabaks commented Apr 19, 2024

Replace default_pool_size to pool_size, see my example

@kumarashish071092
Copy link
Author

kumarashish071092 commented Apr 19, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants