Hi,
On 2019-08-24 15:54:01 -0700, Andres Freund wrote:
> Working on that.
Think it's going to look not too invasive. Needs a good bit more
cleanup, but I'm getting there.
One thing I'm struggling with is understanding and testing nested EPQ
states:
/*
* Each EState must have its own es_epqScanDone state, but if we have
* nested EPQ checks they should share es_epqTupleSlot arrays. This
* allows sub-rechecks to inherit the values being examined by an outer
* recheck.
*/
At the moment I don't understand what the point here is. When/why do we
want to inherit values from the parent epqstate? I know how to construct
queries with nested EPQ, but I don't see why we'd ever want to inherit
the values from the outer check? Nor how we're doing so -
EvalPlanQualFetchRowMarks() unconditionally clears out the old tuple,
and nodeLockRows.c unconditionally fetches the source tuples too?
Greetings,
Andres Freund