Advertisement
Guest User

pgbouncer

a guest
Aug 24th, 2017
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.98 KB | None | 0 0
  1.  10 ;[databases]
  2.  11 * = host=localhost port=5432
  3.  12
  4.  13 ; redirect bardb to bazdb on localhost
  5.  14 ;bardb = host=localhost dbname=bazdb
  6.  15
  7.  16 ; acceess to dest database will go with single user
  8.  17 ;forcedb = host=127.0.0.1 port=300 user=baz password=foo client_encoding=UNICODE datestyle=ISO connect_query='SELECT 1'
  9.  18
  10.  19 ; use custom pool sizes
  11.  20 ;nondefaultdb = pool_size=50 reserve_pool_size=10
  12.  21
  13.  22 ; fallback connect string
  14.  23 ;* = host=testserver
  15.  24
  16.  25 ;; Configuration section
  17.  26 [pgbouncer]
  18.  27
  19.  28 ;;;
  20.  29 ;;; Administrative settings
  21.  30 ;;;
  22.  31
  23.  32 logfile = /var/log/pgbouncer/pgbouncer.log
  24.  33 pidfile = /var/run/pgbouncer/pgbouncer.pid
  25.  34
  26.  35 ;;;
  27.  36 ;;; Where to wait for clients
  28.  37 ;;;
  29.  38
  30.  39 ; ip address or * which means all ip-s
  31.  40 listen_addr = *
  32.  41 listen_port = 6666
  33.  42
  34.  43 ; unix socket is also used for -R.
  35.  44 ; On debian it should be /var/run/postgresql
  36.  45 ;unix_socket_dir = /tmp
  37.  46 ;unix_socket_mode = 0777
  38.  47 ;unix_socket_group =
  39.  48
  40.  49 ;;;
  41.  50 ;;; Authentication settings
  42.  51 ;;;
  43.  52
  44.  53 ; any, trust, plain, crypt, md5
  45.  54 auth_type = md5
  46.  55 ;auth_file = /8.0/main/global/pg_auth
  47.  56 ;auth_file = /usr/local/share/doc/pgbouncer/userlist.txt
  48.  57
  49.  58 ;; Query to use to fetch password from database.  Result
  50.  59 ;; must have 2 columns - username and password hash.
  51.  60 auth_query = SELECT usename, passwd FROM pg_shadow WHERE usename=$1
  52.  61
  53.  62 ;;;
  54.  63 ;;; Users allowed into database 'pgbouncer'
  55.  64 ;;;
  56.  65
  57.  66 ; comma-separated list of users, who are allowed to change settings
  58.  67 admin_users = postgres
  59.  68
  60.  69 ; comma-separated list of users who are just allowed to use SHOW command
  61.  70 stats_users = postgres
  62.  71
  63.  72 ;;;
  64.  73 ;;; Pooler personality questions
  65.  74 ;;;
  66.  75
  67.  76 ; When server connection is released back to pool:
  68.  77 ;   session      - after client disconnects
  69.  78 ;   transaction  - after transaction finishes
  70.  79 ;   statement    - after statement finishes
  71.  80 pool_mode = transaction
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement