Re: Using each rel as both outer and inner for JOIN_ANTI

From: Richard Guo <guofenglinux(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Ronan Dunklau <ronan(dot)dunklau(at)aiven(dot)io>, Pg Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Emre Hasegeli <emre(at)hasegeli(dot)com>
Subject: Re: Using each rel as both outer and inner for JOIN_ANTI
Date: 2022-08-09 08:12:08
Message-ID: CAMbWs4_w=638iYjZH-_cK3xMOVBFuVQus_MWageYUN6u=TJUOA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Aug 2, 2022 at 3:13 PM Richard Guo <guofenglinux(at)gmail(dot)com> wrote:

> On Sun, Jul 31, 2022 at 12:07 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
>> I took a quick look through this. The executor changes are indeed
>> impressively short, but that's largely because you've paid zero
>> attention to updating obsoleted comments. For example, in
>> nodeHashjoin.c there are lots of references to right/full joins
>> that likely now need to cover right-anti. I'm not sure that the
>> empty-rel startup optimizations are correct for this case, either.
>
>
> Thanks for the review! Yeah, you're right. I neglected to update the
> related comments. Will do that in the new patch. For the empty-rel
> startup optimizations, since the right-anti join also does null-fill on
> inner relation (the HJ_FILL_INNER case), I think we cannot skip building
> the hash table even when the outer rel is completely empty.
>

Here is the new patch which addresses the obsoleted comments.

Thanks
Richard

Attachment Content-Type Size
v5-0001-Using-each-rel-as-both-outer-and-inner-for-anti-j.patch application/octet-stream 36.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro Horiguchi 2022-08-09 08:24:35 Re: shared-memory based stats collector - v70
Previous Message Bharath Rupireddy 2022-08-09 07:30:35 Re: Use pg_pwritev_with_retry() instead of write() in dir_open_for_write() to avoid partial writes?