Skip to content

Hashing used in Citus #5007

Answered by marcocitus
Rohit25negi asked this question in Q&A
May 31, 2021 · 1 comments · 4 replies
Discussion options

You must be logged in to vote

Consistent hashing.

If you look at pg_dist_shard you see the range of hash values for each shard:

select * from pg_dist_shard where logicalrelid = 'test'::regclass;
┌──────────────┬─────────┬──────────────┬───────────────┬───────────────┐
│ logicalrelid │ shardid │ shardstorage │ shardminvalue │ shardmaxvalue │
├──────────────┼─────────┼──────────────┼───────────────┼───────────────┤
│ test         │  102008 │ t            │ -2147483648-2013265921   │
│ test         │  102009 │ t            │ -2013265920-1879048193   │
│ test         │  102010 │ t            │ -1879048192-1744830465   │
│ test         │  102011 │ t            │ -1744830464-1610612737   │
│ test        …

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@Rohit25negi
Comment options

@Rohit25negi
Comment options

@marcocitus
Comment options

@Rohit25negi
Comment options

Answer selected by Rohit25negi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants