Re: bugs or my fault - Mailing list pgsql-bugs

From Sergei Kornilov
Subject Re: bugs or my fault
Date
Msg-id 176211631710564@mail.yandex.ru
Whole thread Raw
In response to Re: bugs or my fault  (Yudianto Prasetyo <mr.yudianto@gmail.com>)
Responses Re: bugs or my fault  (Yudianto Prasetyo <mr.yudianto@gmail.com>)
List pgsql-bugs
We don't do just id % 3, we calculate some hash value from partition key (id) and route the tuple according this hash
value.Such condition for your example:
 

select *, satisfies_hash_partition('myschema.customers'::regclass, 3, 0, id) as modulus3_remainder0_target_partition
frommyschema.cust0;
 

Can't illustrate more at the SQL level due to the lack of a uint64 calculations. At C level we are here:
https://github.com/postgres/postgres/blob/REL_13_STABLE/src/backend/partitioning/partbounds.c#L4595

regards, Sergei



pgsql-bugs by date:

Previous
From: Yudianto Prasetyo
Date:
Subject: Re: bugs or my fault
Next
From: Yudianto Prasetyo
Date:
Subject: Re: bugs or my fault