Re: Multi-level hierarchy with parallel append can lead to an extra subplan.

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Multi-level hierarchy with parallel append can lead to an extra subplan.
Дата
Msg-id CA+TgmoYsH4-+5reuDu7jfpUe2bZbk9oM3btK0a_+En6Rd9DFcA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Multi-level hierarchy with parallel append can lead to an extra subplan.  (Amit Khandekar <amitdkhan.pg@gmail.com>)
Список pgsql-hackers
On Tue, Jan 9, 2018 at 5:41 AM, Amit Khandekar <amitdkhan.pg@gmail.com> wrote:
> This subplan should not be there. It looks like that's because when
> we add up subpaths while preparing Parallel Append path containing mix of
> partial and non-partial child paths, in accumulate_append_subpath(),
> the subpath being added is an Append path because it's a multi-level
> partition. So in the condition "else if (special_subpaths != NULL)",
> both *subpaths and *special_paths get updated. But then it is not
> returning from there when it should. Instead, the control passes to
> the end of function where *subpaths is again populated :
> *subpaths = lappend(*subpaths, path);
> which leads to an extra child with partial subpath getting added.

Boy, what a dumb mistake on my part.  Thanks for finding the bug,
Rajkumar.  Thanks for analyzing it, Amit.  I have committed the fix.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: Rangejoin rebased
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: let's make the list of reportable GUCs configurable (was Re: Add%r substitution for psql prompts to show recovery status)