Re: [HACKERS] [POC] hash partitioning

Поиск
Список
Период
Сортировка
От Dilip Kumar
Тема Re: [HACKERS] [POC] hash partitioning
Дата
Msg-id CAFiTN-tYoW9s0pL6cYkhGoniMVZi8=vHD0Q_KYE6xDcKN5SH7g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] [POC] hash partitioning  (amul sul <sulamul@gmail.com>)
Ответы Re: [HACKERS] [POC] hash partitioning  (amul sul <sulamul@gmail.com>)
Список pgsql-hackers
On Thu, May 25, 2017 at 9:59 AM, amul sul <sulamul@gmail.com> wrote:
> On Mon, May 22, 2017 at 2:23 PM, amul sul <sulamul@gmail.com> wrote:
>>
>> Updated patch attached. Thanks a lot for review.
>>
> Minor fix in the document, PFA.

Patch need rebase

-------
Function header is not consistent with other neighbouring functions
(some function contains function name in the header but others don't)
+/*
+ * Compute the hash value for given not null partition key values.
+ */

------
postgres=# create table t1 partition of t for values with (modulus 2,
remainder 1) partition by range(a);
CREATE TABLE
postgres=# create table t1_1 partition of t1 for values from (8) to (10);
CREATE TABLE
postgres=# insert into t1 values(8);
2017-06-03 18:41:46.067 IST [5433] ERROR:  new row for relation "t1_1"
violates partition constraint
2017-06-03 18:41:46.067 IST [5433] DETAIL:  Failing row contains (8).
2017-06-03 18:41:46.067 IST [5433] STATEMENT:  insert into t1 values(8);
ERROR:  new row for relation "t1_1" violates partition constraint
DETAIL:  Failing row contains (8).

The value 8 is violating the partition constraint of the t1 and we are
trying to insert to value in t1,
still, the error is coming from the leaf level table t1_1, that may be
fine but from error, it appears that
it's violating the constraint of t1_1 whereas it's actually violating
the constraint of t1.

From Implementation, it appears that based on the key are identifying
the leaf partition and it's only failing during ExecInsert while
checking the partition constraint.

Other than that, patch looks fine to me.

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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: retry shm attach for windows (WAS: Re: [HACKERS] OK, so culicidaeis *still* broken)
Следующее
От: Jeff Janes
Дата:
Сообщение: Re: [HACKERS] logical replication - still unstable after all these months