pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: pg_plan_advice: Mark PARTITIONWISE inapplicable on plain rels.
2+ messages / 1 participants
[nested] [flat]

* pgsql: pg_plan_advice: Mark PARTITIONWISE inapplicable on plain rels.
@ 2026-10-29 15:56  Robert Haas <rhaas@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Robert Haas @ 2026-10-29 15:56 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

pg_plan_advice: Mark PARTITIONWISE inapplicable on plain rels.

Previously, such advice was accepted, and just had the effect of disabling
every path for the target relation, which isn't the worst imaginable
behavior, but it's not difficult to do better. This commit causes such
advice to instead be marked inapplicable, like INDEX_SCAN(some_table
NO_SUCH_INDEX).

One advantage of this change is that it improves the test coverage
provided by test_plan_advice. In fact, prior to commit
0f7dfd7936b9e99f9aeca00f52ab1692898ffff4, these changes caused
test_plan_advice failures, because the defect fixed by that commit
caused PARTITIONWISE advice to target the wrong relations. Without
this change, the advice feedback doesn't show any sign that there's
a problem, which is how that defect escaped discovery.

Reported-by: Nikolay Samokhvalov <nik@postgres.ai>
Discussion: http://postgr.es/m/CA+Tgmob3X+_CSjAa_BtU9bXrX_ge_HyvO=7gSCLtBpncGwn-kQ@mail.gmail.com
Tested-by: Jakub Wartak <jakub.wartak@enterprisedb.com>
Backpatch-through: 19

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/2a55a15d6b7c1374716df427e701c46c009fbe2d

Modified Files
--------------
contrib/pg_plan_advice/expected/partitionwise.out | 49 +++++++++++++++++++++++
contrib/pg_plan_advice/pgpa_planner.c             | 42 ++++++++++++++++++-
contrib/pg_plan_advice/sql/partitionwise.sql      | 10 +++++
3 files changed, 99 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: pg_plan_advice: Mark PARTITIONWISE inapplicable on plain rels.
@ 2026-10-29 15:56  Robert Haas <rhaas@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Robert Haas @ 2026-10-29 15:56 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

pg_plan_advice: Mark PARTITIONWISE inapplicable on plain rels.

Previously, such advice was accepted, and just had the effect of disabling
every path for the target relation, which isn't the worst imaginable
behavior, but it's not difficult to do better. This commit causes such
advice to instead be marked inapplicable, like INDEX_SCAN(some_table
NO_SUCH_INDEX).

One advantage of this change is that it improves the test coverage
provided by test_plan_advice. In fact, prior to commit
0f7dfd7936b9e99f9aeca00f52ab1692898ffff4, these changes caused
test_plan_advice failures, because the defect fixed by that commit
caused PARTITIONWISE advice to target the wrong relations. Without
this change, the advice feedback doesn't show any sign that there's
a problem, which is how that defect escaped discovery.

Reported-by: Nikolay Samokhvalov <nik@postgres.ai>
Discussion: http://postgr.es/m/CA+Tgmob3X+_CSjAa_BtU9bXrX_ge_HyvO=7gSCLtBpncGwn-kQ@mail.gmail.com
Tested-by: Jakub Wartak <jakub.wartak@enterprisedb.com>
Backpatch-through: 19

Branch
------
REL_19_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/82bd4e644d669dcda98562073098594eb1eba654

Modified Files
--------------
contrib/pg_plan_advice/expected/partitionwise.out | 49 +++++++++++++++++++++++
contrib/pg_plan_advice/pgpa_planner.c             | 42 ++++++++++++++++++-
contrib/pg_plan_advice/sql/partitionwise.sql      | 10 +++++
3 files changed, 99 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2026-10-29 15:56 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-10-29 15:56 pgsql: pg_plan_advice: Mark PARTITIONWISE inapplicable on plain rels. Robert Haas <rhaas@postgresql.org>
2026-10-29 15:56 pgsql: pg_plan_advice: Mark PARTITIONWISE inapplicable on plain rels. Robert Haas <rhaas@postgresql.org>

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