Skip to content

Instantly share code, notes, and snippets.

@geunho
Created May 23, 2022 01:43
Show Gist options
  • Save geunho/e2a7711c5e712d5c6174416257c15add to your computer and use it in GitHub Desktop.
Save geunho/e2a7711c5e712d5c6174416257c15add to your computer and use it in GitHub Desktop.
citus shard별 할당된 node 읽기
SELECT s.shardid id, shardminvalue min, shardmaxvalue MAX, p.nodename
FROM pg_dist_shard s
LEFT JOIN pg_dist_shard_placement p
ON s.shardid = p.shardid
WHERE logicalrelid = $TABLE_NAME::regclass;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment