Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uqGEp-002S28-9n for pgsql-hackers@arkaria.postgresql.org; Sun, 24 Aug 2025 19:18:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1uqGEm-003iLt-6q for pgsql-hackers@arkaria.postgresql.org; Sun, 24 Aug 2025 19:18:44 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uqGEl-003iLl-Qf for pgsql-hackers@lists.postgresql.org; Sun, 24 Aug 2025 19:18:44 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uqGEk-001ddm-0b for pgsql-hackers@lists.postgresql.org; Sun, 24 Aug 2025 19:18:43 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 57OJIXOn470076; Sun, 24 Aug 2025 15:18:33 -0400 From: Tom Lane To: Marc-Olaf Jaschke cc: pgsql-hackers@lists.postgresql.org Subject: Re: Improve hash join's handling of tuples with null join keys In-reply-to: <96AC93D7-9A4E-43EE-9CD9-23E973FE8D40@dshare.de> References: <3061845.1746486714@sss.pgh.pa.us> <496221.1748882849@sss.pgh.pa.us> <175507656113.993.1381684440543440253.pgcf@coridan.postgresql.org> <544D7C83-CECE-44E7-B5D7-530E9318D231@gmail.com> <616751.1755276726@sss.pgh.pa.us> <5C5EE031-F086-4353-A17A-DA563CD24DDD@gmail.com> <463296.1755553046@sss.pgh.pa.us> <659B2B36-C0FE-4642-921D-E7120E838891@gmail.com> <52163.1755988628@sss.pgh.pa.us> <96AC93D7-9A4E-43EE-9CD9-23E973FE8D40@dshare.de> Comments: In-reply-to Marc-Olaf Jaschke message dated "Sun, 24 Aug 2025 13:03:42 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <470074.1756063113.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sun, 24 Aug 2025 15:18:33 -0400 Message-ID: <470075.1756063113@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Marc-Olaf Jaschke writes: > I can confirm that the patch fixes the issue (Bug #19030). The memory us= age 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. Thanks for testing! regards, tom lane