ZQPool is an open source connection pool software for PostgreSQL released by CSUDATA.COM. It mainly solves the following two shortcomings of the popular connection pool software pgbouncer:
The application connects to zqpool, which connects to the PostgreSQL database.
The installation step is as follows:
Configure zqpool Conf file, each configuration item is described as follows:
listen_port = 5436 : set the listening port of zqpool
listen_addr = * : set the listening IP of zqpool, when set to "*", which means listening on all local IP addresses
default_pool_size = 10 : sets the total number of connections to the backend database
max_client_conn = 3000 : the total number of applications allowed to connect to zqpool
db.1.user=u01 : user name of the first database
db.1.dbname=postgres : the first database name
db.1.ipport=172.22.224.10:5432 : ip address and port of the first database
db.1.passwd=u01 : the password of the first database
Configure file is zqpool.conf, each configuration item is described as follows
every pool setup is:
pool.1 represents the first pool, and there can also be pool.2, pool.3 and etc. pool.1.be_ipport can be a list of multiple ip address ports that separated by commas.
start zqpool:
[codetest@pgdev zqpool]$ ./zqpool
2022/05/24 09:12:30 server.go:2188: Starting server on :5436 ...
in another terminal windows,use psql connect to zqpool:
[codetest@pgdev zqpool]$ /usr/pgsql-10/bin/psql -h 172.22.224.10 -p 5436 -Uu01 -d postgres
Password for user u01:
psql (10.20, server 10.5)
Type "help" for help.
postgres=> \d
List of relations
Schema | Name | Type | Owner
--------+--------+-------+----------
public | test01 | table | postgres
(1 row)
postgres=> select * from test01;
id | t
----+---
(0 rows)
postgres=> insert into test01 values(1, '111'),(2,'222'),(3,'333');
INSERT 0 3
postgres=> select * from test01;
id | t
----+-----
1 | 111
2 | 222
3 | 333
(3 rows)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
Activity
Community
Health
Trend
Influence
:Code submit frequency
:React/respond to issue & PR etc.
:Well-balanced team members and collaboration
:Recent popularity of project
:Star counts, download counts etc.