From: Tom Lane <tgl@sss.pgh.pa.us>
To: Anthonin Bonnefoy <anthonin.bonnefoy@datadoghq.com>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: Segfault due to NULL ParamExecData value
Date: Thu, 04 Dec 2025 10:35:36 -0500
Message-ID: <1051948.1764862536@sss.pgh.pa.us> (raw)
In-Reply-To: <CAO6_XqriD8thgACyTxDsUAaCVMJXKn3=c=cW56giN4_-syh_hQ@mail.gmail.com>
References: <CAO6_XqriD8thgACyTxDsUAaCVMJXKn3=c=cW56giN4_-syh_hQ@mail.gmail.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, anthonin.bonnefoy@datadoghq.com, pgsql-bugs@lists.postgresql.org
Subject: Re: Segfault due to NULL ParamExecData value
In-Reply-To: <1051948.1764862536@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox