Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gG0Hn-0000FA-Vv for pgsql-hackers@arkaria.postgresql.org; Fri, 26 Oct 2018 11:28:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gG0Hm-0001ki-8b for pgsql-hackers@arkaria.postgresql.org; Fri, 26 Oct 2018 11:28:14 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gG0Hl-0001ka-Ll for pgsql-hackers@lists.postgresql.org; Fri, 26 Oct 2018 11:28:13 +0000 Received: from wolff.to ([98.103.208.27]) by makus.postgresql.org with smtp (Exim 4.89) (envelope-from ) id 1gG0Hi-0007uw-Rm for pgsql-hackers@lists.postgresql.org; Fri, 26 Oct 2018 11:28:12 +0000 Received: (qmail 8358 invoked by uid 500); 26 Oct 2018 11:23:14 -0000 Date: Fri, 26 Oct 2018 06:23:14 -0500 From: Bruno Wolff III To: Tom Lane Cc: pgsql-general@lists.postgresql.org, pgsql-hackers@lists.postgresql.org Subject: Re: Should pg 11 use a lot more memory building an spgist index? Message-ID: <20181026112314.GA8199@wolff.to> Mail-Followup-To: Bruno Wolff III , Tom Lane , pgsql-general@lists.postgresql.org, pgsql-hackers@lists.postgresql.org References: <20181024012314.GA27428@wolff.to> <19003.1540370028@sss.pgh.pa.us> <20181024083748.GA3296@wolff.to> <19088.1540372871@sss.pgh.pa.us> <20181025174306.GA3184@wolff.to> <24288.1540545369@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <24288.1540545369@sss.pgh.pa.us> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Fri, Oct 26, 2018 at 10:16:09 +0100, Tom Lane wrote: >Bruno Wolff III writes: >> I have something that seems to produce it on rhel7. Fedora isn't working >> well either, but the difference may be due to postgresql.conf being >> different or some difference in the Fedora build. > >Hmm, in my hands this produces the same size leak (~28GB) in either v10 >or v11. In HEAD, somebody's made it even worse (~43GB). So this is >certainly pretty broken, but I'm not sure why it seems worse to you in >v11 than before. As a short term work around, could I create the index first and use insert statements, each in their own transaction, to get the table loaded with the index? Is the issue on Fedora taking very long to build a normal spgist index for network addresses worth pursuing separately, or is it likely to be the same underlying cause? I don't really need to get this working there, as that was just to help with testing. I could also try adjusting memory limits temporarily. If the leak is 28GB on a 32GB system I might be able to get the index built if less memory is tied up in other things. My workstation also has 32GB and the exclude index did build there with the postgresql.conf having lower memory limits.