pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: gowthamdoma18@gmail.com
Subject: BUG #19803: Assertion "!parallel_aware || pathnode->path.parallel_safe" in create_append_path
Date: Wed, 28 Oct 2026 13:06:17 +0000
Message-ID: <19803-1fcc1df108c54ab6@postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      19803
Logged by:          Gowtham Reddy
Email address:      gowthamdoma18@gmail.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.








view thread (4+ messages)  latest in thread

Message-ID: <19803-1fcc1df108c54ab6@postgresql.org>
Permalink:  ../19803-1fcc1df108c54ab6@postgresql.org/
Also on:    postgresql.org/message-id/19803-1fcc1df108c54ab6@postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: noreply@postgresql.org, gowthamdoma18@gmail.com
  Subject: Re: BUG #19803: Assertion "!parallel_aware || pathnode->path.parallel_safe" in create_append_path
  In-Reply-To: <19803-1fcc1df108c54ab6@postgresql.org>
  References: <19803-1fcc1df108c54ab6@postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox