pgbouncer started using “pgbouncer -d -v pgbouncer.ini”
pgbouncer.log file:
2015-01-19 11:37:46.415 24708 DEBUG parse_ini_file: [databases]
2015-01-19 11:37:46.415 24708 DEBUG parse_ini_file: ‘postgres’ = ‘host=192.168.222.141 port=5432 dbname=postgres’
2015-01-19 11:37:46.415 24708 DEBUG pktbuf_dynamic(128): 0×627470
2015-01-19 11:37:46.415 24708 DEBUG parse_ini_file: ‘postgres’ = ‘host=192.168.222.141 port=5432 dbname=postgres’ ok:1
2015-01-19 11:37:46.415 24708 DEBUG parse_ini_file: [pgbouncer]
2015-01-19 11:37:46.415 24708 DEBUG parse_ini_file: ‘logfile’ = ‘/home/sas/pgbouncer.log’
2015-01-19 11:37:46.415 24708 DEBUG parse_ini_file: ‘logfile’ = ‘/home/sas/pgbouncer.log’ ok:1
2015-01-19 11:37:46.416 24708 DEBUG parse_ini_file: ‘pidfile’ = ‘/home/sas/pgbouncer.pid’
2015-01-19 11:37:46.416 24708 DEBUG parse_ini_file: ‘pidfile’ = ‘/home/sas/pgbouncer.pid’ ok:1
2015-01-19 11:37:46.416 24708 DEBUG parse_ini_file: ‘listen_addr’ = ’127.0.0.1′
2015-01-19 11:37:46.416 24708 DEBUG parse_ini_file: ‘listen_addr’ = ’127.0.0.1′ ok:1
2015-01-19 11:37:46.416 24708 DEBUG parse_ini_file: ‘listen_port’ = ’5433′
2015-01-19 11:37:46.416 24708 DEBUG parse_ini_file: ‘listen_port’ = ’5433′ ok:1
2015-01-19 11:37:46.416 24708 DEBUG parse_ini_file: ‘auth_type’ = ‘trust’
2015-01-19 11:37:46.416 24708 DEBUG parse_ini_file: ‘auth_type’ = ‘trust’ ok:1
2015-01-19 11:37:46.416 24708 DEBUG parse_ini_file: ‘auth_file’ = ‘userlist.txt’
2015-01-19 11:37:46.416 24708 DEBUG parse_ini_file: ‘auth_file’ = ‘userlist.txt’ ok:1
2015-01-19 11:37:46.416 24708 DEBUG parse_ini_file: ‘admin_users’ = ‘postgres’
2015-01-19 11:37:46.416 24708 DEBUG parse_ini_file: ‘admin_users’ = ‘postgres’ ok:1
2015-01-19 11:37:46.416 24708 DEBUG parse_ini_file: ‘stats_users’ = ‘stats, postgres’
2015-01-19 11:37:46.416 24708 DEBUG parse_ini_file: ‘stats_users’ = ‘stats, postgres’ ok:1
2015-01-19 11:37:46.416 24708 DEBUG parse_ini_file: ‘pool_mode’ = ‘session’
2015-01-19 11:37:46.416 24708 DEBUG parse_ini_file: ‘pool_mode’ = ‘session’ ok:1
2015-01-19 11:37:46.416 24708 DEBUG parse_ini_file: ‘server_reset_query’ = ‘DISCARD ALL’
2015-01-19 11:37:46.416 24708 DEBUG parse_ini_file: ‘server_reset_query’ = ‘DISCARD ALL’ ok:1
2015-01-19 11:37:46.416 24708 DEBUG parse_ini_file: ‘max_client_conn’ = ’100′
2015-01-19 11:37:46.416 24708 DEBUG parse_ini_file: ‘max_client_conn’ = ’100′ ok:1
2015-01-19 11:37:46.416 24708 DEBUG parse_ini_file: ‘default_pool_size’ = ’20′
2015-01-19 11:37:46.416 24708 DEBUG parse_ini_file: ‘default_pool_size’ = ’20′ ok:1
2015-01-19 11:37:46.416 24708 LOG File descriptor limit: 32768 (H:65536), max_client_conn: 100, max fds possible: 110
2015-01-19 11:37:46.416 24708 DEBUG pktbuf_dynamic(128): 0x6273f0
2015-01-19 11:37:46.416 24708 DEBUG make_room(0x6273f0, 9): realloc newlen=256
2015-01-19 11:37:46.416 24708 DEBUG pktbuf_dynamic(128): 0×627420
//netstat -lntp:
tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN 13534/postgres
tcp 0 0 127.0.0.1:5433 0.0.0.0:* LISTEN 24710/./bin/pgbouncer
pgbouncer.ini file:
[databases]
* = host=127.0.0.1 port=5432
[pgbouncer]
logfile = /home/sas/pgbouncer.log
pidfile = /home/sas/pgbouncer.pid
listen_addr = 127.0.0.1
listen_port = 5433
auth_type = trust
auth_file = userlist.txt
admin_users = postgres
stats_users = stats, postgres
pool_mode = session
server_reset_query = DISCARD ALL
max_client_conn = 100
default_pool_size = 20
My OS: CentOS release 6.4 (Final)
But I cant connect postgres as “psql -p 5433 postgres”.
Also tried as “psql -d pgbouncer -U postgres -p 5433″.
Any solutions?