Re: pgsql: Fix planner's use of Result Cache with unique joins

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: pgsql: Fix planner's use of Result Cache with unique joins
Дата
Msg-id CAApHDvr9vaZ1+_Oeg5YJVBRqCsGOnu2RPBpoPVNtwVigDmFQOg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: pgsql: Fix planner's use of Result Cache with unique joins  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-committers
On Mon, 24 May 2021 at 02:14, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Coverity is not happy with this:

> This complaint is triggered because elsewhere in the same function,
> you're careful to check for inner_path->param_info being null before
> trying to dereference it:
>
>     if ((inner_path->param_info == NULL ||
>          inner_path->param_info->ppi_clauses == NIL) &&
>         innerrel->lateral_vars == NIL)
>         return NULL;
>
> Coverity reasons that it's probably a bug that you didn't do the same
> here; and I think it's right.

Yeah, I think that should be fixed. Thanks for reporting.

I propose the attached.  I think if the restrictlist is empty then we
needn't bother trying Result Cache.

David

Вложения

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Re-order pg_attribute columns to eliminate some padding space.
Следующее
От: David Rowley
Дата:
Сообщение: pgsql: Add missing NULL check when building Result Cache paths