简述
pgpool 连接池采用进程模型,每个业务的连接,都会连接到pgpool的其中一个进程。
you can find all information about citus
欢迎大家积极参与Citus在中国的使用推广和知识传播
pgpool 连接池采用进程模型,每个业务的连接,都会连接到pgpool的其中一个进程。
9.3 版本修复了这个问题,新增如下参数进行控制
citus.max_shared_pool_size(int)
允许连接到每一个worker节点的连接数量,默认 0
0:自动设置。即不会出现超过最大连接数错误的。
-1: 禁用该功能
其他:设置为该值
自动设置时,会将协调器节点的max_connections作为连接数的参考指标,因此协调器与worker的内存和最大连接数不一致的时候,自动设置的功能便不适合。
test=# select master_remove_node('localhost', '1602');
ERROR: you cannot remove the primary node of a node group which has shard placements
test=# select * from pg_dist_node;
nodeid | groupid | nodename | nodeport | noderack | hasmetadata | isactive | noderole | nodecluster | metadatasynced | shouldhaveshards
--------+---------+-----------+----------+----------+-------------+----------+----------+-------------+----------------+------------------
1 | 1 | localhost | 1601 | default | f | t | primary | default | f | t
2 | 2 | localhost | 1602 | default | f | t | primary | default | f | t
(2 rows)
test=# delete from pg_dist_placement where groupid = 2;
-- 这个地方在删除前,也可以把pg_dist_placement备份一下
-- pg_dist_shard 最好也删除一下,要不全表扫描的时候也会报错
test=# select master_remove_node('localhost', '1602');
master_remove_node
--------------------
(1 row)