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

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: gowthamdoma18(at)gmail(dot)com
Subject: BUG #19803: Assertion "!parallel_aware || pathnode->path.parallel_safe" in create_append_path
Date: 2026-10-28 13:06:17
Message-ID: 19803-1fcc1df108c54ab6@postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 19803
Logged by: Gowtham Reddy
Email address: gowthamdoma18(at)gmail(dot)com
PostgreSQL version: 17.11
Operating system: Ubuntu 22.04 (WSL2), x86_64, built with --enable-c
Description:

On an assert-enabled build this query crashes the backend:

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)

Reproduced on 17.11 and master (4848fd675, 2026-10-28), default settings.
A release build (18.6) returns the expected rows.

Needed: an inheritance parent with a child (a plain table does not crash);
the
inlined CTE being a UNION ALL with a constant-false branch (with only true
branches it does not crash); the outer UNION ALL including a MATERIALIZED
CTE
scan. Writing the first branch as a FROM subquery instead of a CTE does not
crash. It looks like a parallel-aware Append is built although one of its
children is not parallel-safe.

Found by a grammar-based SQL fuzzer (university course project); the script
above is the hand-reduced test case.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Rajesh Kumar Thandapani 2026-10-28 13:16:43 Re: BUG #19776: pg_combinebackup ignores the truncation_block_length of an intermediate incremental backup
Previous Message PG Bug reporting form 2026-10-28 13:04:38 BUG #19802: MERGE into a partitioned table fails with "SubPlan found with no parent plan"