0

Citus 11.1.5 select * from citus_shards return many rows, but field shard_size is empty.

I expect that field shard_size from citus_shards table are not be empty. I need to calculate size of all shards.

Yuriy
  • 1

1 Answers1

0

It should print the size; this is my output on 11.2.

├─[ RECORD 3 ]─────┼───────────────────────────────┤
│ table_name       │ citus.demo_distributed        │
│ shardid          │ 102016                        │
│ shard_name       │ citus.demo_distributed_102016 │
│ citus_table_type │ distributed                   │
│ colocation_id    │ 1                             │
│ **shard_size**   │ **8192**                      │
JelteF
  • 3,021
  • 2
  • 27
  • 35
  • May be it is some bag on 11.1.5: "shardid","shard_size" 102014,NULL 102014,NULL 102014,NULL – Yuriy Apr 14 '23 at 19:57
  • I could reproduce this on 11.1 branch, but once I inserted rows, I do see the non-zero size. select * from citus_shard_sizes(); ┌──────────────────────────┬──────┐ │ table_name │ size │ ├──────────────────────────┼──────┤ │ citus.local_table_102013 │ 0 │ │ │ 0 │ │ citus.dist_table_102009 │ 8192 │ │ citus.dist_table_102011 │ 8192 │ │ citus.ref_table_102012 │ 0 │ │ │ 0 │ │ citus.dist_table_102008 │ 8192 │ │ citus.dist_table_102010 │ 8192 │ └──────────────────────────┴──────┘ – Teja Mupparti Apr 18 '23 at 16:37
  • select * from citus_shards; table_name │ shardid │ shard_name │ citus_table_type │ colocation_id │ nodename │ nodeport │ shard_size │ ref_table │ 102012 │ citus.ref_table_102012 │ reference │ 2 │ 127.0.0.1 │ 10000 │ 0 │ │ ref_table │ 102012 │ citus.ref_table_102012 │ reference │ 2 │ 127.0.0.1 │ 11000 │ **0** │ **insert into ref_table values(1,0);** │ ref_table │ 102012 │ citus.ref_table_102012 │ reference │ 2 │ 127.0.0.1 │ 10000 │ **8192** │ – Teja Mupparti Apr 18 '23 at 16:41
  • While the query is running I see: WARNING: stack depth limit exceeded HINT: Increase the configuration parameter "max_stack_depth" (currently 2048kB), after ensuring the platform's stack depth limit is adequate. – Yuriy Apr 19 '23 at 18:23
  • Which query are you referring to, select * from citus_shards is causing stackoverflow? – Teja Mupparti Apr 21 '23 at 01:09