docker-pgbouncer icon indicating copy to clipboard operation
docker-pgbouncer copied to clipboard

Make `user` directive optional

Open fuero opened this issue 3 months ago • 4 comments

The default for the user directive in pgBouncer is "not present". Using it creates problems running this container in Kubernetes/OpenShift with securityContexts given. Making it optional allows using a UID that's not postgres or root.

Also, I filtered the entrypoint script through shellcheck, applied autofixes, and manually applied the POSIX compatibility recommendations.

fuero avatar Oct 16 '25 08:10 fuero

Thanks for the contribution @fuero

For my information, can you point out where user is optional under [pgbouncer]? In fact I seem unable to find documentation on that particular config item.

At this point my preferred approach would be to maintain postgres as a default value, unless disabled or overridden, out of concern for existing deployments.

jflambert avatar Oct 16 '25 13:10 jflambert

In the link you mentioned under the text for the user directive it says Default: not set Which to me says "optional"

fuero avatar Oct 16 '25 13:10 fuero

In the link you mentioned under the text for the user directive it says Default: not set Which to me says "optional"

Thanks, it's right at the top under "Generic settings"

I'm still worried about previously imposing postgres and suddenly switching to unset.

jflambert avatar Oct 16 '25 13:10 jflambert

At this point my preferred approach would be to maintain postgres as a default value, unless disabled or overridden, out of concern for existing deployments.

@fuero if you can address this concern either by testing that going from postgres->unset is fine, or setting it as a default value, we could move forward with your PR. Thanks!

jflambert avatar Nov 19 '25 19:11 jflambert