Re: BUG #19803: Assertion "!parallel_aware || pathnode->path.parallel_safe" in create_append_path

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: gowthamdoma18(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #19803: Assertion "!parallel_aware || pathnode->path.parallel_safe" in create_append_path
Date: 2026-10-29 01:22:01
Message-ID: CAApHDvqg4sf+A=Sty5ACML6yZZBBhcaRG2DmROMid_BHo-d2bQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thu, 29 Oct 2026 at 05:25, PG Bug reporting form
<noreply(at)postgresql(dot)org> wrote:
> CREATE TABLE pi (a int);
> CREATE TABLE pi_child () INHERITS (pi);
> WITH c1 AS (SELECT 1 FROM pi WHERE true UNION ALL SELECT 1 FROM pi WHERE
> false),
> c2 AS MATERIALIZED (SELECT 1)
> SELECT 1 FROM c1 UNION ALL SELECT 2 FROM c2;
>
> TRAP: failed Assert("!parallel_aware || pathnode->path.parallel_safe"),
> File: "pathnode.c", Line: 1439 (master 4848fd675; line 1328 on 17.11)

Thanks for reporting this. It looks like this happens because there's
a childrel with partial_paths that's marked as consider_parallel =
false. add_paths_to_append_rel() doesn't check if childrel has
consider_parallel == true before looking at the partial_pathlist. It
expects that's empty when the childrel is consider_parallel == false.
Looks like we can just delete the partial_pathlist when
consider_parallel gets set to false. That's what most other places do
when doing rel->consider_parallel = false; Check
apply_scanjoin_target_to_paths(). This doesn't seem to need to be done
in set_append_rel_size().

Draft patch attached.

David

Attachment Content-Type Size
nullify_partial_pathlist_when_unsetting_consider_parallel.patch application/octet-stream 896 bytes

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Gowtham Reddy 2026-10-29 01:27:47 Re: BUG #19802: MERGE into a partitioned table fails with "SubPlan found with no parent plan"
Previous Message Tender Wang 2026-10-29 00:39:04 Re: BUG #19802: MERGE into a partitioned table fails with "SubPlan found with no parent plan"