| From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
|---|---|
| To: | Florin Irion <irionr(at)gmail(dot)com> |
| Cc: | shihao zhong <zhong950419(at)gmail(dot)com>, Neil Chen <carpenter(dot)nail(dot)cz(at)gmail(dot)com>, song yanli <songyanlili(at)outlook(dot)com>, "Jonathan Gonzalez V(dot)" <jonathan(dot)abdiel(at)gmail(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: pg_plan_advice: add NO_ scan and join method tags |
| Date: | 2026-11-20 20:15:37 |
| Message-ID: | CA+TgmoYa4wEhbzHHcZm88m_xPRkV=BE2rwVfMXkbrJ0QmbgKbQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Sat, Sep 19, 2026 at 11:07 AM Florin Irion <irionr(at)gmail(dot)com> wrote:
>> cfbot reports that v4 need rebase, so I rebased it onto current
>> master, e1d8f81d496. The result is attached as v5. It is your patch
>> with your authorship, and the rebase is the only change.
>>
>> Still keep `Ready For Committer` in commitfeast.
Sorry for the slow response here. Couple of points from me:
- I know that I was the one who proposed e.g. NO_NESTED_LOOP as well
as NO_NESTED_LOOP{_PLAIN/_MATERIALIZE/_MEMOIZE), but as I reflect on
that recommendation, I wonder if we should be adding positive versions
i.e. NESTED_LOOP(x) and MERGE_JOIN(x) that allow all the versions of
that thing at the same time. Or maybe this should be two commits in
one order or the other. It just seems a little odd to be able to say
NESTED_LOOP_MATERIALIZE() and NO_NESTED_LOOP_MATERIALIZE() and
NO_NESTED_LOOP() but not NESTED_LOOP(). Or we could go the other way
and only allow the full version: NESTED_LOOP_PLAN() and
NO_NESTED_LOOP_PLAIN() but not the shorter versions. But right now I
feel like it's not as consistent as I would like.
- Bare blocks are not PostgreSQL style i.e. don't do this:
+ /* Handle NO_ join method advice. */
+ {
- I think the documentation and the commit messages need some
word-smithing. The "negative counterpart" language is problematic,
because the behavior is not exactly opposite. I would suggest
something like this: Negative join method advice specifies a
relation, or set of relations, that should appear on the inner side of
a join, but which should not use the named join method. For example,
NO_HASH_JOIN(a) means that a should appear on the inner side of some
join that is not a hash join. I would encourage keeping the
documentation for these negative tags briefer than for the
corresponding positive tags, to avoid tedious duplication.
- Is there a reason for the no_scan and no_join tests to be separate
from scan.sql and join.sql?
--
Robert Haas
Databricks
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Melanie Plageman | 2026-11-20 20:44:07 | Re: WAL_LOG CREATE DATABASE strategy broken for non-standard page layouts |
| Previous Message | Nathan Bossart | 2026-11-20 20:13:22 | more cleanup for s_lock.h |