Re: Check for tuplestorestate nullness before dereferencing

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: Check for tuplestorestate nullness before dereferencing
Дата
Msg-id CAApHDvqQ6xUtQy=0epOAmvXHjgHEz57P9UtW=SNjHmtL_cUgXA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Check for tuplestorestate nullness before dereferencing  (Alena Rybakina <a.rybakina@postgrespro.ru>)
Ответы Re: Check for tuplestorestate nullness before dereferencing
Список pgsql-hackers
On Tue, 15 Oct 2024 at 05:21, Alena Rybakina <a.rybakina@postgrespro.ru> wrote:
> As I see it, node->eflags can be zero if it passes the output of a
> subquery, during the initialization of the Material node execution, and
> when the subquery is rescanned.

Do you have a test case that calls Material with zero eflags?  I tried
adding Assert(node->eflags != 0) to ExecMaterial() and nothing failed.

It would be good to know if the optimisation added in d2c555ee5 ever
applies with today's code. If it does apply, we should likely add a
test case for it and if it never does, then we should just remove the
optimisation and always create the tuplestore when it's NULL.

David



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