pgsql: pg_plan_advice: Don't suppress NO_GATHER advice for parent rels.

Started by Robert Haasabout 2 months ago1 messagescommitters
Jump to latest
#1Robert Haas
rhaas@postgresql.org

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: /messages/by-id/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(-)