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

pgbouncer: Сreate the 'user_search' function in pgbouncer_auth_dbname only #568

Merged
merged 1 commit into from
Feb 2, 2024
Merged

Conversation

SDV109
Copy link
Contributor

@SDV109 SDV109 commented Feb 2, 2024

This PR is to optimize adding the user_search function to {{pgbouncer_auth_dbname }} only and only once, if the given function already exists, the playbook will not perform the function creation step, when pgbouncer_auth_user is 'true'.

When pgbouncer_auth_user is 'false' a block will be used to create a userlist file.
pgbouncer_auth_user is 'false'

When pgbouncer_auth_user is 'true', the playbook will use the block to create the user_search function in {{pgbouncer_auth_dbname }} only on the master server.
image

When restarting the playbook, when the user_search function is already exists in {{pgbouncer_auth_dbname }}, there will only be a stage of checking for the existence of this function, there will be no repeat stage to add the function.
image

@vitabaks vitabaks changed the title Update block if pgbouncer_auth_user is 'true' pgbouncer: Сreate the 'user_search' function in {{ pgbouncer_auth_dbname }} only Feb 2, 2024
@vitabaks vitabaks changed the title pgbouncer: Сreate the 'user_search' function in {{ pgbouncer_auth_dbname }} only pgbouncer: Сreate the 'user_search' function in pgbouncer_auth_dbname only Feb 2, 2024
@vitabaks
Copy link
Owner

vitabaks commented Feb 2, 2024

Thanks @SDV109

@vitabaks vitabaks merged commit 8c78432 into vitabaks:master Feb 2, 2024
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants