Postgresql 所有分布式查询都会使用Citus任务跟踪器执行器失败

Postgresql 所有分布式查询都会使用Citus任务跟踪器执行器失败,postgresql,citus,Postgresql,Citus,我正在尝试在Citus 5.0上测试分布式连接的性能。我有一个主节点和两个工作节点,以及一些散列分布表,它们的行为与默认配置的预期一致。我需要使用TaskTracker executor来测试需要重新分区的查询 但是,将citus.task\u executor\u type设置为task tracker后,所有涉及分布式表的查询都会失败。例如: postgres=# SET citus.task_executor_type TO "task-tracker"; SET postgres=# S

我正在尝试在Citus 5.0上测试分布式连接的性能。我有一个主节点和两个工作节点,以及一些散列分布表,它们的行为与默认配置的预期一致。我需要使用TaskTracker executor来测试需要重新分区的查询

但是,将
citus.task\u executor\u 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
postgresql.conf
中设置
citus.task\u executor\u type
具有相同的效果

切换任务执行器是否需要其他配置更改

编辑,更多信息:

  • PostGIS安装在所有节点上
  • postgres_fdw安装在主机上
  • 所有其他配置都是原始的
到目前为止,所有表格的分布情况如下:

SELECT master_create_distributed_table('table_name', 'id', 'hash');
SELECT master_create_worker_shards('table_name', 8, 2);
distrib\u mcuser\u 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

任务跟踪器执行器将任务(碎片查询)分配给在worker节点上运行的后台worker,后者连接到
localhost
以运行任务。如果超级用户在连接到
localhost
时需要密码,则后台工作人员将无法连接。这可以通过在工作节点上添加一个
.pgpass
文件来解决,该文件用于连接到
localhost

您可以修改身份验证设置,并通过更改
pg_hba.conf
让工作节点连接到主机,而无需密码检查

将以下行添加到主控
pg_conf.hba

host    all             all             [worker 1 ip]/32            trust
host    all             all             [worker 2 ip]/32            trust
并为每个worker-1
pg_hba.conf
添加以下行:

host    all             all             [master ip]/32              trust
host    all             all             [worker 2 ip]/32            trust
host    all             all             [master ip]/32              trust
host    all             all             [worker 1 ip]/32            trust
然后转到worker-2
pg_hba.conf

host    all             all             [master ip]/32              trust
host    all             all             [worker 2 ip]/32            trust
host    all             all             [master ip]/32              trust
host    all             all             [worker 1 ip]/32            trust

这仅用于测试,在没有采取必要的安全预防措施的情况下,不要将其用于生产系统。

正常情况下,只需将
任务执行器类型设置为
任务跟踪器即可。你能提供更多的信息吗?您使用了哪种分区方法?你有多少碎片?
distrib\u mcuser\u car
的架构是什么?你使用其他插件吗?你做了其他配置更改吗?@AhmetErenBaşak我已经用更多信息更新了这个问题。谢谢你的帮助!