Re: Improve hash join's handling of tuples with null join keys

From: Marc-Olaf Jaschke <moj(at)dshare(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Improve hash join's handling of tuples with null join keys
Date: 2025-08-24 13:03:42
Message-ID: 96AC93D7-9A4E-43EE-9CD9-23E973FE8D40@dshare.de
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:

> Bug #19030 [1] seems to be a fresh report of the problem this patch
> aims to solve.

> [1] https://www.postgresql.org/message-id/flat/19030-944dd78d7ef94c0f%40postgresql.org
>

I can confirm that the patch fixes the issue (Bug #19030). The memory usage remains within the expected range of work_mem.
This also applies to parallel hash joins.
The query also runs significantly faster.
I also tested cases with multiple left joins.
I have only observed this problem when there are many null values in the join column.

regards
Marc-Olaf Jaschke

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2025-08-24 15:31:51 Re: Test instability when pg_dump orders by OID
Previous Message Thomas Munro 2025-08-24 12:38:16 Re: Non-reproducible AIO failure