Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vRBMs-008iPH-0S for pgsql-bugs@arkaria.postgresql.org; Thu, 04 Dec 2025 15:35:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vRBMr-003Cl8-0k for pgsql-bugs@arkaria.postgresql.org; Thu, 04 Dec 2025 15:35:41 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vRBMq-003Cl0-37 for pgsql-bugs@lists.postgresql.org; Thu, 04 Dec 2025 15:35:41 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vRBMp-0037od-1A for pgsql-bugs@lists.postgresql.org; Thu, 04 Dec 2025 15:35:41 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 5B4FZaZg1051949; Thu, 4 Dec 2025 10:35:36 -0500 From: Tom Lane To: Anthonin Bonnefoy cc: pgsql-bugs@lists.postgresql.org Subject: Re: Segfault due to NULL ParamExecData value In-reply-to: References: Comments: In-reply-to Anthonin Bonnefoy message dated "Thu, 04 Dec 2025 15:25:55 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1051947.1764862536.1@sss.pgh.pa.us> Date: Thu, 04 Dec 2025 10:35:36 -0500 Message-ID: <1051948.1764862536@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Anthonin Bonnefoy 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