Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1jGQRm-0003qX-7v for pgsql-hackers@arkaria.postgresql.org; Mon, 23 Mar 2020 17:01:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1jGQRl-0002g5-20 for pgsql-hackers@arkaria.postgresql.org; Mon, 23 Mar 2020 17:01:05 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1jGQRk-0002fy-Oy for pgsql-hackers@lists.postgresql.org; Mon, 23 Mar 2020 17:01:04 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jGQRi-0001eT-2w for pgsql-hackers@lists.postgresql.org; Mon, 23 Mar 2020 17:01:04 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id 02NH0xtd018132; Mon, 23 Mar 2020 13:00:59 -0400 From: Tom Lane To: Alvaro Herrera cc: Pg Hackers Subject: Re: weird hash plan cost, starting with pg10 In-reply-to: <20200323165059.GA24950@alvherre.pgsql> References: <20200323165059.GA24950@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Mon, 23 Mar 2020 13:50:59 -0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <18130.1584982859.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 23 Mar 2020 13:00:59 -0400 Message-ID: <18131.1584982859@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Alvaro Herrera writes: > While messing with EXPLAIN on a query emitted by pg_dump, I noticed that > current Postgres 10 emits weird bucket/batch/memory values for certain > hash nodes: > -> Hash (cost=3D0.11..0.11 rows=3D10 width=3D= 12) (actual time=3D0.002..0.002 rows=3D1 loops=3D8) > Buckets: 2139062143 Batches: 2139062143 = Memory Usage: 8971876904722400kB > -> Function Scan on unnest init_1 (cost= =3D0.01..0.11 rows=3D10 width=3D12) (actual time=3D0.001..0.001 rows=3D1 l= oops=3D8) Looks suspiciously like uninitialized memory ... > The complete query is: Reproduces here, though oddly only a couple of the several hash subplans are doing that. I'm not planning to dig into it right this second either. regards, tom lane