Re: BUG #15357: Data goes to wrong partition in HASH Partitioned table

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: jobin(dot)augustine(at)percona(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #15357: Data goes to wrong partition in HASH Partitioned table
Date: 2018-08-28 15:40:57
Message-ID: 20180828154057.ul5t2k4lzo7zmkjv@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 2018-Aug-28, PG Bug reporting form wrote:

> Step 3. Try inserting a row which will have remainder 0 after modulus
> operation
> postgres=# insert into hash_parted values (10);
> ERROR: no partition of relation "hash_parted" found for row
> DETAIL: Partition key of the failing row contains (a) = (10).
>
> FAILED!

The hash function for integers does not return the input integer,
therefore the modulus is not that of the integer value. This is not a
bug.

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Dean Rasheed 2018-08-28 19:05:13 Re: BUG #15307: Low numerical precision of (Co-) Variance
Previous Message Alexander Kukushkin 2018-08-28 15:32:44 Re: BUG #15346: Replica fails to start after the crash