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

From: Gowtham Reddy <gowthamdoma18(at)gmail(dot)com>
To: David Rowley <dgrowleyml(at)gmail(dot)com>
Cc: 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:31:50
Message-ID: CAOZ9b+qGYeRg_-kDnHLqN3sYe+dbCMz8w0g=XsH04XPLRy+_bg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi David,
Thanks for the quick analysis and the draft patch.

I applied it on master at 4848fd675 (assert-enabled build). The
reproducer from my report no longer crashes and returns the expected
row, also with debug_parallel_query = on. The original, larger test
case from the fuzzer that led to this report also runs without the
assertion failure, and "make check" passes.

Regards,
Gowtham

On Thu, 29 Oct 2026 at 06:52, David Rowley <dgrowleyml(at)gmail(dot)com> wrote:
>
> 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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Amit Langote 2026-10-29 01:40:25 Re: BUG #19786: JSON_TABLE: subquery in PASSING gives "unexpected non-SELECT command in SubLink"
Previous 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"