Anthonin Bonnefoy <anthonin.bonnefoy@datadoghq.com> writes:
> So it looks like the ParamExec for the InitPlan 5 was correctly executed
> (since execPlan is null) and the value was probably used during the first
> two updates. But for the third update, the ParamExecData's value was null
> leading to the segfault.
> All coredumps (or rather WAL records) show a similar pattern of 2 updates
> before segfaults.
> I haven't been able to reproduce the segfault so I wasn't able to pinpoint
> what could have set ParamExecData's value to null.
I'm not volunteering to look into this without a reproducer.
However, seeing that EvalPlanQual is in the stack trace,
my gut feeling is that the EPQ mechanism is somehow mis-managing
output Params for InitPlans. I vaguely recall some definitional
issues around whether it'd be okay to pass down already-computed
InitPlan results into the EPQ sub-evaluation, or whether we should
force the sub-evaluation to do those afresh. It was awhile back
and I don't remember what was decided.
Don't suppose you can try to reproduce this on something newer
than 14.17?
regards, tom lane