Re: BUG #19056: ExecInitPartitionExecPruning segfault due to NULL es_part_prune_infos

From: Amit Langote <amitlangote09(at)gmail(dot)com>
To: feichanghong <feichanghong(at)qq(dot)com>
Cc: David Rowley <dgrowleyml(at)gmail(dot)com>, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #19056: ExecInitPartitionExecPruning segfault due to NULL es_part_prune_infos
Date: 2025-09-18 03:37:07
Message-ID: CA+HiwqGzUmLfMU3zoZWN2U31gsY57zULzds8MoX2uocd1yu_hg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thu, Sep 18, 2025 at 12:10 PM Amit Langote <amitlangote09(at)gmail(dot)com> wrote:
> On Thu, Sep 18, 2025 at 10:58 feichanghong <feichanghong(at)qq(dot)com> wrote:
>> On Sep 18, 2025, at 09:33, Amit Langote <amitlangote09(at)gmail(dot)com> wrote:
>> On Thu, Sep 18, 2025 at 7:32 AM David Rowley <dgrowleyml(at)gmail(dot)com> wrote:
>> On Thu, 18 Sept 2025 at 09:43, David Rowley <dgrowleyml(at)gmail(dot)com> wrote:
>>
>> The first bad commit is:
>>
>> commit bb3ec16e14ded1d23a46d3c7e623a965164fa124
>> Author: Amit Langote <amitlan(at)postgresql(dot)org>
>> Date: Thu Jan 30 11:57:32 2025 +0900
>>
>> Move PartitionPruneInfo out of plan nodes into PlannedStmt
>>
>> I think the attached is the correct fix. I also wonder if it's worth
>> an isolation test to exercise this code.
>>
>> Thanks for the patch, David, and for the report, Fei. I indeed forgot
>> to update EvalPlanQualStart() in that commit.
>>
>> I agree about adding an isolation test, which I have done in the
>> attached updated patch.
>>
>> Thanks David and Amit for the patch. It looks OK to me, and isolation
>> testing confirms the issue. Also, should s1ppx and s2ppx in the case be
>> renamed to s4ppx and s5ppx?
>
> Good catch, you are right, will fix. Thanks.

Fixed. Will push this barring objections.

--
Thanks, Amit Langote

Attachment Content-Type Size
v3-0001-Fix-EPQ-crash-from-missing-partition-pruning-stat.patch application/octet-stream 4.6 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message David Rowley 2025-09-18 03:47:37 Re: BUG #19056: ExecInitPartitionExecPruning segfault due to NULL es_part_prune_infos
Previous Message Amit Langote 2025-09-18 03:10:50 Re: BUG #19056: ExecInitPartitionExecPruning segfault due to NULL es_part_prune_infos