我试图在Citus 5.0上对分布式连接进行性能测试。我有一个主节点和两个工作节点,以及一些散列分布式表,其行为与默认配置一样。我需要使用任务跟踪器执行程序来测试需要重新分区的查询。
但是,将citus.task_executor_type
设置为task-tracker
后,涉及分布式表的所有查询都会失败。例如:
postgres=# SET citus.task_executor_type TO "task-tracker";
SET
postgres=# SELECT 1 FROM distrib_mcuser_car LIMIT 1;
ERROR: failed to execute job 39
DETAIL: Too many task tracker failures
在citus.task_executor_type
中设置postgresql.conf
具有相同的效果。
是否还有其他一些配置更改我错过了切换任务执行程序所必需的内容?
编辑,更多信息:
到目前为止,所有表都分布如下:
SELECT master_create_distributed_table('table_name', 'id', 'hash');
SELECT master_create_worker_shards('table_name', 8, 2);
distrib_mcuser_car
的架构相当大,所以这里有一个更简单的例子:
postgres=# \d+ distrib_test_int
Table "public.distrib_test_int"
Column | Type | Modifiers | Storage | Stats target | Description
--------+---------+-----------+---------+--------------+-------------
num | integer | | plain | |
postgres=# select * from distrib_test_int;
ERROR: failed to execute job 76
DETAIL: Too many task tracker failures
答案 0 :(得分:3)
任务跟踪器执行程序将任务(对分片的查询)分配给在工作节点上运行的后台工作程序,后者连接到localhost
以运行任务。如果超级用户在连接到localhost
时需要密码,则后台工作程序将无法连接。这可以通过在工作节点上添加.pgpass
文件来解决,以便连接到localhost
。
答案 1 :(得分:2)
您可以通过更改pg_hba.conf
。
将以下行添加到主pg_conf.hba
:
host all all [worker 1 ip]/32 trust
host all all [worker 2 ip]/32 trust
以下为每个工作人员1 pg_hba.conf
:
host all all [master ip]/32 trust
host all all [worker 2 ip]/32 trust
关注worker-2 pg_hba.conf
:
host all all [master ip]/32 trust
host all all [worker 1 ip]/32 trust
这仅用于测试,请勿在未采取必要的安全预防措施的情况下将其用于生产系统。