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 1gFEkN-0006zF-JL for pgsql-general@arkaria.postgresql.org; Wed, 24 Oct 2018 08:42:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gFEkK-0004Qz-5J for pgsql-general@arkaria.postgresql.org; Wed, 24 Oct 2018 08:42:32 +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_SHA384:256) (Exim 4.89) (envelope-from ) id 1gFEkJ-0004Qs-TI for pgsql-general@lists.postgresql.org; Wed, 24 Oct 2018 08:42:31 +0000 Received: from wolff.to ([98.103.208.27]) by magus.postgresql.org with smtp (Exim 4.89) (envelope-from ) id 1gFEkB-0000c4-SF for pgsql-general@lists.postgresql.org; Wed, 24 Oct 2018 08:42:30 +0000 Received: (qmail 3530 invoked by uid 500); 24 Oct 2018 08:37:48 -0000 Date: Wed, 24 Oct 2018 03:37:48 -0500 From: Bruno Wolff III To: Tom Lane Cc: pgsql-general@lists.postgresql.org Subject: Re: Should pg 11 use a lot more memory building an spgist index? Message-ID: <20181024083748.GA3296@wolff.to> Mail-Followup-To: Bruno Wolff III , Tom Lane , pgsql-general@lists.postgresql.org References: <20181024012314.GA27428@wolff.to> <19003.1540370028@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <19003.1540370028@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 Wed, Oct 24, 2018 at 09:33:48 +0100, Tom Lane wrote: >Bruno Wolff III writes: >> While reloading a database cluster to move from 10.5 to 11, I'm getting >> out of memory crashes that I did see when doing reloads on pg 10. >> The statement flagged in the log is this: >> 2018-10-23 16:44:34.815 CDT [126839] STATEMENT: ALTER TABLE ONLY public.iplocation >> ADD CONSTRAINT overlap EXCLUDE USING spgist (network WITH &&); > >Hm, there's a fair amount of new code in SP-GIST in v11, so maybe you've >hit a memory leak in that. Can you create a self-contained test case? I'll try. I think I should only need the geolite data to cause the problem and I can share that publicly. So far the problem seems to be happening consistently. I'll work on this at the office, but probably won't get it done until the afternoon. If I have a substantial database dump file to provide for reproducing this do you prefer it on a web server somewhere? I expect that mailing very large attachments to the lists is a bad idea.