RE: Parallel INSERT (INTO ... SELECT ...)

Поиск
Список
Период
Сортировка
От Hou, Zhijie
Тема RE: Parallel INSERT (INTO ... SELECT ...)
Дата
Msg-id 86da2c46f2614c96a09053209635ca9e@G08CNEXMBPEKD05.g08.fujitsu.local
обсуждение исходный текст
Ответ на Re: Parallel INSERT (INTO ... SELECT ...)  (Amit Langote <amitlangote09@gmail.com>)
Список pgsql-hackers
> > --------
> > static Query *
> > rewriteRuleAction(Query *parsetree,
> > ...
> >                 if (sub_action_ptr)
> > +               {
> >                         *sub_action_ptr = sub_action;
> > +                       rule_action->hasModifyingCTE |=
> parsetree->hasModifyingCTE;
> > +               }
> > --------
> >
> > And the Basic test passed.
> > What do you think ?
> 
> That is very close to what I was going to suggest, which is this:
> 
> diff --git a/src/backend/rewrite/rewriteHandler.c
> b/src/backend/rewrite/rewriteHandler.c
> index 0672f497c6..3c4417af98 100644
> --- a/src/backend/rewrite/rewriteHandler.c
> +++ b/src/backend/rewrite/rewriteHandler.c
> @@ -631,6 +631,8 @@ rewriteRuleAction(Query *parsetree,
>                 checkExprHasSubLink((Node *)
> rule_action->returningList);
>     }
> 
> +   rule_action->hasModifyingCTE |= parsetree->hasModifyingCTE;
> +
>     return rule_action;
>  }


    if (parsetree->cteList != NIL && sub_action->commandType != CMD_UTILITY)
    {
    ...
        sub_action->cteList = list_concat(sub_action->cteList,
    }

Is is possible when sub_action is CMD_UTILITY ?
In this case CTE will be copied to the newone, should we set the set the flag in this case ?

Best regard,
houzj




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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: Single transaction in the tablesync worker?
Следующее
От: "Hou, Zhijie"
Дата:
Сообщение: RE: Parallel INSERT (INTO ... SELECT ...)