From: Robert Haas <rhaas@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: pg_plan_advice: Avoid assertion failure with partitionwise aggre
Date: Mon, 30 Mar 2026 14:03:59 +0000
Message-ID: <E1w7DDi-0029t5-2F@gemulon.postgresql.org> (raw)
pg_plan_advice: Avoid assertion failure with partitionwise aggregate.
An Append node that is part of a partitionwise aggregate has no
apprelids. If such a node was elided, the previous coding would
attempt to call unique_nonjoin_rtekind() on a NULL pointer, which
leads to an assertion failure. Insert a NULL check to prevent that.
Reported-by: Alexander Lakhin <exclusion@gmail.com>
Discussion: http://postgr.es/m/0afba1ce-c946-4131-972d-191d9a1c097c@gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/e2ee95233cab32a0d5fe64925aefe816c13dbbc0
Modified Files
--------------
contrib/pg_plan_advice/pgpa_scan.c | 7 +++++++
1 file changed, 7 insertions(+)
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 using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: rhaas@postgresql.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: pg_plan_advice: Avoid assertion failure with partitionwise aggre
In-Reply-To: <E1w7DDi-0029t5-2F@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