Re: Check for tuplestorestate nullness before dereferencing - Mailing list pgsql-hackers

From David Rowley
Subject Re: Check for tuplestorestate nullness before dereferencing
Date
Msg-id CAApHDvqQ6xUtQy=0epOAmvXHjgHEz57P9UtW=SNjHmtL_cUgXA@mail.gmail.com
Whole thread Raw
In response to Re: Check for tuplestorestate nullness before dereferencing  (Alena Rybakina <a.rybakina@postgrespro.ru>)
List 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 by date:

Previous
From: Masahiko Sawada
Date:
Subject: Re: UUID v7
Next
From: Andy Fan
Date:
Subject: Re: Considering fractional paths in Append node