1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
| $ sudo -i -u postgres psql
postgres= table_name | shardid | shard_name | citus_table_type | colocation_id | nodename | nodeport | shard_size ------------+---------+-------------------+------------------+---------------+----------+----------+------------ test_table | 102076 | test_table_102076 | distributed | 4 | centos12 | 5432 | 8192 test_table | 102077 | test_table_102077 | distributed | 4 | centos13 | 5432 | 8192
postgres= logicalrelid | shardid | shardstorage | shardminvalue | shardmaxvalue --------------+---------+--------------+---------------+--------------- test_table | 102076 | t | -2147483648 | -1 test_table | 102077 | t | 0 | 2147483647
postgres= placementid | shardid | shardstate | shardlength | groupid -------------+---------+------------+-------------+--------- 69 | 102076 | 1 | 0 | 1 70 | 102077 | 1 | 0 | 2
postgres= shardid | shardstate | shardlength | nodename | nodeport | placementid ---------+------------+-------------+----------+----------+------------- 102076 | 1 | 0 | centos12 | 5432 | 69 102077 | 1 | 0 | centos13 | 5432 | 70 postgres= from pg_dist_placement placement, pg_dist_node node, pg_dist_shard shard where placement.groupid = node.groupid and shard.shardid = placement.shardid order by shard limit 5; table | shard | host ------------+--------+---------- test_table | 102076 | centos12 test_table | 102077 | centos13
postgres= order by shardid limit 5; shardid | success | result ---------+---------+------------ 102076 | t | 8192 bytes 102077 | t | 8192 bytes
postgres= get_shard_id_for_distribution_column -------------------------------------- 102076
postgres=
|