From: Peter Eisentraut Date: Sat, 3 Aug 2019 11:51:02 +0000 (+0200) Subject: Add [users] section to example config file X-Git-Tag: pgbouncer_1_11_0~20 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=095a0c465ca92c9660348d36778a2c114b16aa5f;p=pgbouncer Add [users] section to example config file Also add some missing documentation about the [users] section. Reported-by: @brunomgalmeida fixes #330 --- diff --git a/doc/config.md b/doc/config.md index da64445..311f15e 100644 --- a/doc/config.md +++ b/doc/config.md @@ -841,15 +841,21 @@ Ask specific **timezone** from server. ## Section [users] -This contains key=value pairs where key will be taken as a user name and -value as a libpq connect-string style list of key=value pairs. As actual libpq is not -used, so not all features from libpq can be used. +This contains key=value pairs where the key will be taken as a user name and +the value as a libpq connect-string style list of key=value pairs of +configuration settings specific for this user. Only a few settings +are available here. ### pool_mode Set the pool mode to be used for all connections from this user. If not set, the database or default pool_mode is used. +### max_user_connections + +Configure a maximum for the user (i.e. all pools with the user will +not have more than this many server connections). + ## Include directive diff --git a/etc/pgbouncer.ini b/etc/pgbouncer.ini index fed6db1..eb582cd 100644 --- a/etc/pgbouncer.ini +++ b/etc/pgbouncer.ini @@ -26,6 +26,11 @@ ; fallback connect string ;* = host=testserver +;; User-specific configuration +[users] + +user1 = pool_mode=transaction max_user_connections=10 + ;; Configuration section [pgbouncer]