Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pYy3V-0007N6-Ia for pgsql-bugs@arkaria.postgresql.org; Sun, 05 Mar 2023 23:46:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pYy3S-0004Lk-VT for pgsql-bugs@arkaria.postgresql.org; Sun, 05 Mar 2023 23:46:14 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pYy3S-0004Lb-N0 for pgsql-bugs@lists.postgresql.org; Sun, 05 Mar 2023 23:46:14 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pYy3M-0001Nm-19 for pgsql-bugs@lists.postgresql.org; Sun, 05 Mar 2023 23:46:13 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 325Nk6HO3225217; Sun, 5 Mar 2023 18:46:06 -0500 From: Tom Lane To: "Howard A. Chou" cc: "pgsql-bugs@lists.postgresql.org" Subject: Re: found a possible bug, modulus of an integer on a partition table appears to be wrong In-reply-to: <382692025.2538273.1678041938275@mail.yahoo.com> References: <382692025.2538273.1678041938275.ref@mail.yahoo.com> <382692025.2538273.1678041938275@mail.yahoo.com> Comments: In-reply-to "Howard A. Chou" message dated "Sun, 05 Mar 2023 18:45:38 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <3225215.1678059966.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sun, 05 Mar 2023 18:46:06 -0500 Message-ID: <3225216.1678059966@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk "Howard A. Chou" writes: > The remainder of 4, 6, 8 mod 2 should be 0.=C2=A0 Instead of inserting i= nto 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