From: | Alexander Pyhalov <a(dot)pyhalov(at)postgrespro(dot)ru> |
---|---|
To: | Richard Guo <guofenglinux(at)gmail(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Inconsistency between try_mergejoin_path and create_mergejoin_plan |
Date: | 2024-06-19 14:24:18 |
Message-ID: | caef79b25a49f670decdc41c3087064d@postgrespro.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Richard Guo писал(а) 2024-06-19 16:30:
> On Wed, Jun 19, 2024 at 12:49 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Richard Guo <guofenglinux(at)gmail(dot)com> writes:
>> > It seems to me that the new operator is somewhat artificial, since it is
>> > designed to support a mergejoin but lacks a valid commutator. So before
>> > we proceed to discuss the fix, I'd like to know whether this is a valid
>> > issue that needs fixing.
>
>> I do not think we should add a great deal of complexity or extra
>> planner cycles to deal with this; but if it can be fixed at low
>> cost, we should.
>
> I think we can simply verify the validity of commutators for clauses in
> the form "inner op outer" when selecting mergejoin/hash clauses. If a
> clause lacks a commutator, we should consider it unusable for the given
> pair of outer and inner rels. Please see the attached patch.
>
This seems to be working for my test cases.
--
Best regards,
Alexander Pyhalov,
Postgres Professional
From | Date | Subject | |
---|---|---|---|
Next Message | Tomas Vondra | 2024-06-19 14:34:52 | suspicious valgrind reports about radixtree/tidstore on arm64 |
Previous Message | Isaac Morland | 2024-06-19 14:23:45 | Re: Add pg_get_acl() function get the ACL for a database object |