Re: search_plan_tree(): handling of non-leaf CustomScanState nodes causes segfault

Поиск
Список
Период
Сортировка
От Zhihong Yu
Тема Re: search_plan_tree(): handling of non-leaf CustomScanState nodes causes segfault
Дата
Msg-id CALNJ-vQoKAtKsbKFHDgvAo5o+EGv7yGFiUjzY4sLA+imkzfJ+A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: search_plan_tree(): handling of non-leaf CustomScanState nodes causes segfault  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: search_plan_tree(): handling of non-leaf CustomScanState nodes causes segfault  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi, Tom:
I was thinking that, if sstate->ss_currentRelation is null for the other cases, that would be a bug.
An assertion can be added for the cases ending with T_TidScanState.
Though, the null sstate->ss_currentRelation would surface immediately (apart from assertion). So I omitted the assertion in the diff.

Cheers

On Mon, Jan 18, 2021 at 12:16 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Zhihong Yu <zyu@yugabyte.com> writes:
> It seems sstate->ss_currentRelation being null can only
> occur for T_ForeignScanState and T_CustomScanState.
> What about the following change ?

Seems like more code for no very good reason.

                        regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Narrow the scope of the variable outputstr in logicalrep_write_tuple
Следующее
От: Victor Yegorov
Дата:
Сообщение: Re: Deleting older versions in unique indexes to avoid page splits