From: David Rowley <drowley@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Empty partial_pathlist when unsetting consider_parallel flag
Date: Thu, 29 Oct 2026 03:21:47 +0000
Message-ID: <E1xMGi3-00000001CjF-0YeB@gemulon.postgresql.org> (raw)
Empty partial_pathlist when unsetting consider_parallel flag
It's not valid for a RelOptInfo to have a non-empty partial_pathlist
when its consider_parallel is true. In set_append_rel_pathlist() when
we see the parent rel doesn't have consider_parallel set, we set that
property to false for the child. It is possible that the child already
has some partial paths at that point, so we need to nullify that list as
well as set the consider_parallel flag to false.
For the reported problem case, the partial paths had been created during
set_subquery_pathlist(). These not being empty was causing an Assert
failure on cassert builds. I think this could only have gone on to
result in some wasted planner effort in non-cassert builds, but cannot
confirm if anything worse could have happened.
Bug: #19803
Reported-by: Gowtham Reddy <gowthamdoma18@gmail.com>
Author: David Rowley <dgrowleyml@gmail.com>
Tested-by: Gowtham Reddy <gowthamdoma18@gmail.com>
Discussion: https://postgr.es/m/19803-1fcc1df108c54ab6@postgresql.org
Backpatch-through: 14
Branch
------
REL_16_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/dd9f55249a642439ee9b1685d5ec33efb982f86d
Modified Files
--------------
src/backend/optimizer/path/allpaths.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
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-committers@postgresql.org
Cc: drowley@postgresql.org
Subject: Re: pgsql: Empty partial_pathlist when unsetting consider_parallel flag
In-Reply-To: <E1xMGi3-00000001CjF-0YeB@gemulon.postgresql.org>
References: <E1xMGi3-00000001CjF-0YeB@gemulon.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