apt-get install pgbouncer
vim /etc/pgbouncer/pgbouncer.ini
[databases] * = [pgbouncer] logfile = /var/log/postgresql/pgbouncer.log pidfile = /var/run/postgresql/pgbouncer.pid listen_addr = 127.0.0.1 listen_port = 6432 unix_socket_dir = /var/run/postgresql auth_type = trust auth_file = /etc/pgbouncer/userlist.txt admin_users = postgres stats_users = postgres pool_mode = transaction
vim /etc/pgbouncer/userlist.txt
"postgres" "" "edokumenty" "" "http" ""
/etc/init.d/pgbouncer restart