github.com/1aal/kubeblocks@v0.0.0-20231107070852-e1c03e598921/deploy/postgresql/config/pgbouncer-ini.tpl (about)

     1  [pgbouncer]
     2  listen_addr = 0.0.0.0
     3  listen_port = 6432
     4  unix_socket_dir = /tmp/
     5  unix_socket_mode = 0777
     6  auth_file = /opt/bitnami/pgbouncer/conf/userlist.txt
     7  auth_user = postgres
     8  auth_query = SELECT usename, passwd FROM pg_shadow WHERE usename=$1
     9  pidfile =/opt/bitnami/pgbouncer/tmp/pgbouncer.pid
    10  logfile =/opt/bitnami/pgbouncer/logs/pgbouncer.log
    11  auth_type = md5
    12  pool_mode = session
    13  ignore_startup_parameters = extra_float_digits
    14  {{- $max_client_conn := 10000 }}
    15  {{- $phy_memory := getContainerMemory ( index $.podSpec.containers 0 ) }}
    16  {{- if gt $phy_memory 0 }}
    17  {{- $max_client_conn = min ( div $phy_memory 9531392 ) 5000 }}
    18  {{- end }}
    19  max_client_conn = {{ $max_client_conn }}
    20  admin_users = postgres
    21  ;;; [database]
    22  ;;; config default database in pgbouncer_setup.sh