Re: Question about some changes in 11.3

Поиск
Список
Период
Сортировка
От Amit Langote
Тема Re: Question about some changes in 11.3
Дата
Msg-id 7f478763-93d7-8912-14f1-32d02a2b9bb3@lab.ntt.co.jp
обсуждение исходный текст
Ответ на Question about some changes in 11.3  (Mat Arye <mat@timescale.com>)
Список pgsql-hackers
Hi Mat,

On 2019/05/25 6:05, Mat Arye wrote:
> Hi,
> 
> 11.3 included some change to partition table planning. Namely
> commit 925f46f ("Fix handling of targetlist SRFs when scan/join relation is
> known empty.") seems to redo all paths for partitioned tables
> in apply_scanjoin_target_to_paths. It clears the paths in:
> 
> ```
>  if (rel_is_partitioned)
>         rel->pathlist = NIL
> ```
> 
> Then the code rebuild the paths. However, the rebuilt append path never
> gets the
> set_rel_pathlist_hook called. Thus, the work that hook did previously gets
> thrown away and the rebuilt append path can never be influenced by this
> hook.

By dropping the old paths like done here, the core code is simply
forgetting that set_rel_pathlist_hook may have editorialized over them,
which seems like an oversight of that commit.

Your proposal to call set_rel_pathlist_hook() after
add_paths_to_append_rel() to rebuild the Append paths sounds fine to me.

Thanks,
Amit




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

Предыдущее
От: Amit Langote
Дата:
Сообщение: Re: PG 12 draft release notes
Следующее
От: Kohei KaiGai
Дата:
Сообщение: How to know referenced sub-fields of a composite type?