Re: Improve hash join's handling of tuples with null join keys - Mailing list pgsql-hackers

From Chao Li
Subject Re: Improve hash join's handling of tuples with null join keys
Date
Msg-id 375DCE57-1107-48B7-9A64-3B3FC24CCECD@gmail.com
Whole thread Raw
In response to Re: Improve hash join's handling of tuples with null join keys  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Improve hash join's handling of tuples with null join keys
List pgsql-hackers

> On Mar 19, 2026, at 03:10, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> "Joel Jacobson" <joel@compiler.org> writes:
>> I've tested v3-0001 and v3-0002 and can confirm the bug introduced
>> in v3-0001 is fixed in v3-0002:
>
> Thanks for testing!
>
> I noticed from the cfbot that this patch wasn't building anymore.
> nodeHash[join].c now need explicit inclusions of utils/tuplestore.h,
> presumably as a result of Alvaro's recent header-inclusion cleanups.
> Here's a v4 that fixes that; no other changes.
>
> We're getting towards the end of the v19 development cycle, so
> I'm planning to push this soon if there's not objections.
>

I remember I reviewed this patch some time ago, so I revisited v4 today and played with it a bit

Overall, this looks like a solid patch to me.

The only thing I noticed is that while 0002 fixes the tuple-counting issue, there does not seem to be a test that would
failwithout it. So I think it would be better to add a test case for 0002. I tried doing that and attached a diff.
Without0002, the test fails; with 0002, it passes. 

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/



Attachment

pgsql-hackers by date:

Previous
From: Ashutosh Bapat
Date:
Subject: Re: SQL Property Graph Queries (SQL/PGQ)
Next
From: Michael Paquier
Date:
Subject: Re: Adding locks statistics