Re: Using each rel as both outer and inner for JOIN_ANTI - Mailing list pgsql-hackers

From Richard Guo
Subject Re: Using each rel as both outer and inner for JOIN_ANTI
Date
Msg-id CAMbWs4_w=638iYjZH-_cK3xMOVBFuVQus_MWageYUN6u=TJUOA@mail.gmail.com
Whole thread Raw
In response to Re: Using each rel as both outer and inner for JOIN_ANTI  (Richard Guo <guofenglinux@gmail.com>)
Responses Re: Using each rel as both outer and inner for JOIN_ANTI
List pgsql-hackers

On Tue, Aug 2, 2022 at 3:13 PM Richard Guo <guofenglinux@gmail.com> wrote:
On Sun, Jul 31, 2022 at 12:07 AM Tom Lane <tgl@sss.pgh.pa.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

pgsql-hackers by date:

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