Re: pgsql: Fix EPQ crash from missing partition directory in EState

From: Amit Langote <amitlangote09(at)gmail(dot)com>
To: Amit Langote <amitlan(at)postgresql(dot)org>
Cc: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Fix EPQ crash from missing partition directory in EState
Date: 2025-10-16 06:20:29
Message-ID: CA+HiwqHW6iAePVDWg1DDmMWiV9QCNcAH4Ncdt4k0Z-W6KVNqVg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On Thu, Oct 16, 2025 at 2:03 PM Amit Langote <amitlan(at)postgresql(dot)org> wrote:
> Fix EPQ crash from missing partition directory in EState
>
> EvalPlanQualStart() failed to propagate es_partition_directory into
> the child EState used for EPQ rechecks. When execution time partition
> pruning ran during the EPQ scan, executor code dereferenced a NULL
> partition directory and crashed.
>
> Previously, propagating es_partition_directory into the EPQ EState was
> unnecessary because CreatePartitionPruneState(), which sets it on
> demand, also initialized the exec-pruning context. After commit
> d47cbf474,

Oops, that could’ve been worded better -- I meant “Prior to d47cbf474”
rather than “Previously”.

--
Thanks, Amit Langote

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Christoph Berg 2025-10-16 11:38:35 failed NUMA pages inquiry status: Operation not permitted
Previous Message Amit Kapila 2025-10-16 05:21:42 pgsql: Refactor logical worker synchronization code into a separate fil