_대문 | 방명록 | 최근글 | 홈피소개 | 주인놈 |
FrontPage › pgbouncer
|
|
PgBouncer is a lightweight connection pooler for PostgreSQL.
[edit]
1 서버 정보 #
[edit]
2 설치 #rpm -Uvh http://yum.postgresql.org/9.4/redhat/rhel-7-x86_64/pgdg-centos94-9.4-1.noarch.rpm yum update yum install pgbouncer [edit]
4 DB 및 테이블 생성 #192.168.56.102서버
psql -x -c "CREATE DATABASE sample WITH ENCODING='UTF8' CONNECTION LIMIT=-1;" psql -x -d sample -c "create table test(id int)" psql -x -d sample -c "insert into test(id) values(1)" psql -x -d sample -c "select * from test" [edit]
5 config #vi /etc/pgbouncer/config.ini [databases] db1 = host=192.168.56.102 port=5432 dbname=sample user=postgres password=9999 [pgbouncer] pool_mode = session listen_port = 6543 listen_addr = * auth_type = md5 auth_file = /etc/pgbouncer/users.txt logfile = pgbouncer.log pidfile = pgbouncer.pid admin_users = postgres
|
어머니는 우리가 기댈 사람이 아니라 어디에 기댄다는 것 그 자체가 필요 없도록 해주는 사람이다. (D. 피셔) |