Re: bugs or my fault

From: Sergei Kornilov <sk(at)zsrv(dot)org>
To: Yudianto Prasetyo <mr(dot)yudianto(at)gmail(dot)com>
Cc: Peter Smith <smithpb2250(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: bugs or my fault
Date: 2021-09-15 13:38:53
Message-ID: 176211631710564@mail.yandex.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 from myschema.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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Yudianto Prasetyo 2021-09-15 14:16:36 Re: bugs or my fault
Previous Message Yudianto Prasetyo 2021-09-15 12:44:41 Re: bugs or my fault