From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Andres Freund <andres(at)anarazel(dot)de> |
Cc: | Peter Geoghegan <pg(at)bowt(dot)ie>, David Rowley <dgrowleyml(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: On disable_cost |
Date: | 2024-06-12 19:11:53 |
Message-ID: | CA+Tgmobr=bBJDZATs-KoV5Q-CDxVEN5TSSAVc0iBLo_KFoV=tQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Jun 12, 2024 at 2:48 PM Andres Freund <andres(at)anarazel(dot)de> wrote:
> Sorry, should have been more precise. With "set" I didn't mean set to true,
> but that that it's only modified within select_mergejoin_clauses().
Oh. "set" has more than one relevant meaning here.
> > It starts out true, and always stays true except for right, right-anti, and
> > full joins, where select_mergejoin_clauses() can set it to false. Since the
> > call to match_unsorted_outer() is gated by mergejoin_enabled, you might
> > think that we'd skip considering nested loops on the strength of not being
> > able to do a merge join, but comment "2." in add_paths_to_joinrel explains
> > that the join types for which mergejoin_enabled can end up false aren't
> > supported by nested loops anyway. Still, this logic is really tortured.
>
> Agree that that's the logic - but doesn't that mean we'll consider nestloops
> for e.g. right joins iff enable_mergejoin=false?
No, because that function has its own internal guards. See nestjoinOK.
But don't misunderstand me: I'm not defending the status quo. The
whole thing seems like a Rube Goldberg machine to me.
--
Robert Haas
EDB: http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2024-06-12 19:29:40 | Re: Improve the granularity of PQsocketPoll's timeout parameter? |
Previous Message | Jeff Davis | 2024-06-12 19:10:29 | Re: Addressing SECURITY DEFINER Function Vulnerabilities in PostgreSQL Extensions |