简体   繁体   English

Citus:我可以在主节点上查看每个节点的分表吗?

[英]Citus: Can I view sharded tables of each node on master node?

I am managing my PostgreSQL cluster in docker-compose and I have connected to master(coordinator) node via external client.我在docker-compose中管理我的 PostgreSQL 集群,并且我已通过外部客户端连接到主(协调器)节点。 For a given table(for example companies ) and a given node number(for example worker 2 or other identifier), can I view sharded tables(for example companies_000005} , companies_0000010} and their rows on worker 2) in master node without directly connecting to the individual node?对于给定的表(例如companies )和给定的节点号(例如工人2或其他标识符),我可以在主节点中查看分片表(例如companies_000005}companies_0000010}及其在工人2上的行)而不直接连接到单个节点?

To see some information about the shards (such as shard sizes or which node the shard is on), you can use the following query with Citus 10 and later:要查看有关分片的一些信息(例如分片大小或分片位于哪个节点),您可以在 Citus 10 及更高版本中使用以下查询:

SELECT * FROM citus_shards;

Also, accessing the shards directly is not a suggested pattern, and it prevents certain checks/enforcements that Citus does around distributed locking and correctness etc. With that in mind, why do you need to access the shards directly?此外,直接访问分片不是建议的模式,它会阻止 Citus 围绕分布式锁定和正确性等进行的某些检查/强制执行。考虑到这一点,为什么需要直接访问分片?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Citus:将现有数据库作为citus的工作节点 - Citus: make existing database as worker node of citus 如何在 citus postgres 中获取分片表的聚合行数 - How to get aggregate row count for sharded tables in citus postgres 运行几天后无法编写postgres slony-i主节点表 - postgres slony-i master node tables can't be written after running for few days Citus:2节点PGSQL集群是否可行?如果是,怎么办? - Citus: is a 2 node PGSQL cluster doable and if yes how? Citus:如何在分布式表列表中添加自引用表 - Citus: How can I add self referencing table in distributed tables list 添加工作节点并使用 PostgreSQL + Citus 重新平衡分布式分片问题 - add worker node and rebalance distributed shards problem with PostgreSQL + Citus PostgreSQL 添加新节点后的 Citus Shard Rebalancing -> 连接到远程节点 localhost:5432 失败并出现以下错误 - PostgreSQL Citus Shard Rebalancing after adding new node -> connection to the remote node localhost:5432 failed with the following error citus:我可以为分布式表添加一个副本吗 - citus: Can I add one more replica for a distributed table 我可以更改现有Citus表上的分配方法吗? - Can I change the distribution method on an existing Citus table? 我们可以将 Citus 与 Gorm 一起使用吗? - Can we use Citus with Gorm?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM