Re: Asymmetric partition-wise JOIN

From: Alexander Pyhalov <a(dot)pyhalov(at)postgrespro(dot)ru>
To: Andrey Lepikhov <a(dot)lepikhov(at)postgrespro(dot)ru>
Cc: Zhihong Yu <zyu(at)yugabyte(dot)com>, Anastasia Lubennikova <a(dot)lubennikova(at)postgrespro(dot)ru>, Daniel Gustafsson <daniel(at)yesql(dot)se>, Kohei KaiGai <kaigai(at)heterodb(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Asymmetric partition-wise JOIN
Date: 2021-07-06 13:09:19
Message-ID: feba91824546bf8242a9c420286edc97@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrey Lepikhov писал 2021-07-06 12:28:
> On 5/7/21 23:15, Zhihong Yu wrote:
>> On Mon, Jul 5, 2021 at 2:57 AM Andrey Lepikhov
>> <a(dot)lepikhov(at)postgrespro(dot)ru <mailto:a(dot)lepikhov(at)postgrespro(dot)ru>> wrote:
>> +            * Can't imagine situation when join relation already
>> exists. But in
>> +            * the 'partition_join' regression test it happens.
>> +            * It may be an indicator of possible problems.
>> Should a log be added in the above case ?
> I made additional analysis of this branch of code. This situation can
> happen in the case of one child or if we join two plane tables with
> partitioned. Both situations are legal and I think we don't needed to
> add any log message here.
> Other mistakes were fixed.

Hi.

Small typo in comment in src/backend/optimizer/plan/setrefs.c:

281
282 /*
283 * Adjust RT indexes of AppendRelInfos and add to final
appendrels list.
284 * The AppendRelInfos are copied, because as a part of a
subplan its could
285 * be visited many times in the case of asymmetric join.
286 */
287 foreach(lc, root->append_rel_list)
288 {

its -> it (or they) ?
--
Best regards,
Alexander Pyhalov,
Postgres Professional

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2021-07-06 13:13:42 Re: Fix pkg-config file for static linking
Previous Message Dean Rasheed 2021-07-06 12:50:58 Re: [PATCH] expand the units that pg_size_pretty supports on output