Re: Multi-Column List Partitioning
От | Zhihong Yu |
---|---|
Тема | Re: Multi-Column List Partitioning |
Дата | |
Msg-id | CALNJ-vQmmRrM3AAAXZumovWrOybC_ALDwPHAJ+3K71tBNcGb5Q@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Multi-Column List Partitioning (Nitin Jadhav <nitinjadhavpostgres@gmail.com>) |
Ответы |
Re: Multi-Column List Partitioning
|
Список | pgsql-hackers |
On Fri, Oct 22, 2021 at 2:48 AM Nitin Jadhav <nitinjadhavpostgres@gmail.com> wrote:
> While testing further I got a crash with partition wise join enabled for multi-col list partitions. please find test case & stack-trace below.Thanks for sharing. I have fixed the issue in the attached patch.Thanks & Regards,Nitin Jadhav
Hi,
+isListBoundDuplicated(List *list_bounds, List *new_bound)
+ Const *value1 = castNode(Const, list_nth(elem, i));
+ Const *value2 = castNode(Const, list_nth(new_bound, i));
+ Const *value2 = castNode(Const, list_nth(new_bound, i));
Should the upper bound for index i take into account the length of new_bound ?
If the length of new_bound is always the same as that for elem, please add an assertion.
For transformPartitionListBounds():
+ deparse_expression((Node *) list_nth(partexprs, j),
+ deparse_context_for(RelationGetRelationName(parent),
+ RelationGetRelid(parent)),
+ deparse_context_for(RelationGetRelationName(parent),
+ RelationGetRelid(parent)),
Please consider calling RelationGetRelationName(parent) and RelationGetRelid(parent) (and assigning to local variables) outside the loop.
+get_list_datum_count(PartitionBoundSpec **boundspecs, int nparts)
get_list_datum_count -> get_list_datums_count
For partition_bounds_equal():
+ if (b1->isnulls)
+ b1_isnull = b1->isnulls[i][j];
+ if (b2->isnulls)
+ b2_isnull = b2->isnulls[i][j];
+ b1_isnull = b1->isnulls[i][j];
+ if (b2->isnulls)
+ b2_isnull = b2->isnulls[i][j];
Should the initialization of b1_isnull and b2_isnull be done inside the loop (so that they don't inherit value from previous iteration) ?
Cheers
В списке pgsql-hackers по дате отправления: