pgsql: pg_plan_advice: Don't suppress NO_GATHER advice for parent rels. - Mailing list pgsql-committers

From Robert Haas
Subject pgsql: pg_plan_advice: Don't suppress NO_GATHER advice for parent rels.
Date
Msg-id E1xFEA5-00000000yIU-43p0@gemulon.postgresql.org
Whole thread
List pgsql-committers
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(-)


pgsql-committers by date:

Previous
From: Daniel Gustafsson
Date:
Subject: pgsql: Fix detection of truncated compressed backups
Next
From: Robert Haas
Date:
Subject: pgsql: pg_plan_advice: Fix advice feedback JOIN_ORDER over a single sub