From: Robert Haas <rhaas@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: pg_plan_advice: Don't suppress NO_GATHER advice for parent rels.
Date: Fri, 09 Oct 2026 17:13:37 +0000
Message-ID: <E1xFEA5-00000000yIU-43p0@gemulon.postgresql.org> (raw)
pg_plan_advice: Don't suppress NO_GATHER advice for parent rels.
When a table is partitioned, the previous code did not emit NO_GATHER
advice for the parent table, on the theory that doing this for the
child tables was good enough. However, it isn't. I believe what
happened here is that, during development, I was planning to enforce
NO_GATHER by clearing the consider_parallel flag for the children,
which would have been good enough to ensure that parallelism could
not be used at any higher level of the plan tree. Eventually, I
switched course, but failed to realize that this code needed to be
updated as a result. Do that, and add a regression test.
Backpatch-through: 19
Discussion: http://postgr.es/m/CA+TgmoYYHC4i-Gpzc9-JYHqih6pOK+6LTYFiNR-PioXG1nKkOQ@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/f71a9969d58e3e70239fc51bbeae668db973b265
Modified Files
--------------
contrib/pg_plan_advice/expected/gather.out | 66 +++++++++++++++++++
contrib/pg_plan_advice/expected/partitionwise.out | 78 ++++++++++++-----------
contrib/pg_plan_advice/pgpa_scan.c | 7 +-
contrib/pg_plan_advice/sql/gather.sql | 26 ++++++++
4 files changed, 135 insertions(+), 42 deletions(-)
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: rhaas@postgresql.org
Subject: Re: pgsql: pg_plan_advice: Don't suppress NO_GATHER advice for parent rels.
In-Reply-To: <E1xFEA5-00000000yIU-43p0@gemulon.postgresql.org>
References: <E1xFEA5-00000000yIU-43p0@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