| 1 | = PgBouncer = |
| 2 | |
| 3 | 1. Instalacja (Debian itp.) |
| 4 | |
| 5 | {{{ |
| 6 | apt-get install pgbouncer |
| 7 | }}} |
| 8 | |
| 9 | |
| 10 | vim /etc/pgbouncer/pgbouncer.ini |
| 11 | |
| 12 | [databases] |
| 13 | |
| 14 | * = |
| 15 | |
| 16 | [pgbouncer] |
| 17 | |
| 18 | logfile = /var/log/postgresql/pgbouncer.log |
| 19 | |
| 20 | pidfile = /var/run/postgresql/pgbouncer.pid |
| 21 | |
| 22 | listen_addr = 127.0.0.1 |
| 23 | |
| 24 | listen_port = 6432 |
| 25 | |
| 26 | unix_socket_dir = /var/run/postgresql |
| 27 | |
| 28 | auth_type = trust |
| 29 | |
| 30 | auth_file = /etc/pgbouncer/userlist.txt |
| 31 | |
| 32 | admin_users = postgres |
| 33 | |
| 34 | stats_users = postgres |
| 35 | |
| 36 | pool_mode = transaction |
| 37 | |
| 38 | |
| 39 | vim /etc/pgbouncer/userlist.txt |
| 40 | |
| 41 | "postgres" "" |
| 42 | |
| 43 | "edokumenty" "" |
| 44 | |
| 45 | "http" "" |
| 46 | |
| 47 | 3. Restart usługi |
| 48 | |
| 49 | {{{ |
| 50 | /etc/init.d/pgbouncer restart |
| 51 | }}} |