Re: found a possible bug, modulus of an integer on a partition table appears to be wrong

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Howard A(dot) Chou" <maingroup(at)yahoo(dot)com>
Cc: "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: found a possible bug, modulus of an integer on a partition table appears to be wrong
Date: 2023-03-05 23:46:06
Message-ID: 3225216.1678059966@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Howard A. Chou" <maingroup(at)yahoo(dot)com> writes:
> The remainder of 4, 6, 8 mod 2 should be 0.  Instead of inserting into t1_0, all values were inserted into t1_1

You are confusing "modulus of the column value" with "modulus of
the hash of the column value". The latter is what determines
tuple routing in a hash-partitioned table.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Thomas Munro 2023-03-06 03:02:02 Re: BUG #17368: Assert failed in GetSafeSnapshot() for SERIALIZABLE READ ONLY DEFERRABLE transaction
Previous Message David G. Johnston 2023-03-05 23:18:43 Re: BUG #17822: Some scripts are blocked by Device Guard