Re: [HACKERS] [POC] hash partitioning - Mailing list pgsql-hackers

From Dilip Kumar
Subject Re: [HACKERS] [POC] hash partitioning
Date
Msg-id CAFiTN-tXrYjGPo4hK8c-KWnweSw=JT=WShcyjAboof_T7-J3MA@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] [POC] hash partitioning  (amul sul <sulamul@gmail.com>)
Responses Re: [HACKERS] [POC] hash partitioning
List pgsql-hackers
On Mon, May 15, 2017 at 4:27 PM, amul sul <sulamul@gmail.com> wrote:
> Updated patches attached.

While testing latest patch I found a strange behaviour.

test1:
postgres=# create table x (a int) partition by hash(a);
CREATE TABLE
postgres=# create table x1 partition of x for values with (modulus 4,
remainder 0);
CREATE TABLE
postgres=# create table x2 partition of x for values with (modulus 4,
remainder 1);
CREATE TABLE
postgres=# insert into x values(1);
2017-05-15 20:55:20.446 IST [28045] ERROR:  no partition of relation
"x" found for row
2017-05-15 20:55:20.446 IST [28045] DETAIL:  Partition key of the
failing row contains (a) = (1).
2017-05-15 20:55:20.446 IST [28045] STATEMENT:  insert into x values(1);
ERROR:  no partition of relation "x" found for row
DETAIL:  Partition key of the failing row contains (a) = (1).

Test2:
postgres=# insert into x2 values(100);   -- it should violates
partition constraint
INSERT 0 1

Seems like a bug or am I missing something completely?

-- 
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: David Fetter
Date:
Subject: Re: [HACKERS] Hash Functions
Next
From: Sokolov Yura
Date:
Subject: Re: [HACKERS] Small improvement to compactify_tuples